# -*- coding: utf-8 -*- def sum_day(n): a = "{:02}".format(n) return int(a[0]) + int(a[1]) def main(): month = range(12) day = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] c = list() counter = 0 t = list() for i in month: c.append((i + 1, range(1, day[i] + 1))) for m, ds in c: for d in ds: if m == sum_day(d): counter += 1 print(counter) if __name__ == '__main__': main()