@@ -0,0 +1,682 @@
+# Return a vector with the number of people born in the specific ranges.%0A# birthdays - %5Bint%5D%0A# ranges - %5B(int, int)%5D%0A%0A%0Adef birthdays_count(birthdays, ranges):%0A    dates = %5B0%5D * 366%0A    prefix_sum = %5B0%5D%0A    result = %5B%5D%0A%0A    for date in birthdays:%0A        dates%5Bdate%5D += 1%0A%0A    for date_count in dates:%0A        prefix_sum.append(prefix_sum%5B-1%5D + date_count)%0A%0A    for elem in ranges:%0A        result.append(prefix_sum%5Belem%5B-1%5D + 1%5D - prefix_sum%5Belem%5B0%5D%5D)%0A%0A    return result%0A%0A%0Adef main():%0A%0A    birthdays = %5B5, 10, 6, 7, 3, 4, 5, 11, 21, 300, 15%5D%0A    ranges = %5B(4, 9), (6, 7), (200, 225), (300, 365)%5D%0A%0A    print(birthdays_count(birthdays, ranges))%0A%0A%0Aif __name__ == '__main__':%0A    main()%0A

add birtday_ranges.py