d1 = list(range(1, 29)) d2 = list(range(1, 31)) d3 = list(range(1, 32)) ans = 0 for i in range(1, 13): if i == 2: for j in d1: if i == sum(divmod(j, 10)): ans += 1 elif i == 4 or i == 6 or i == 9 or i == 11: for j in d2: if i == sum(divmod(j, 10)): ans += 1 else: for j in d3: if i == sum(divmod(j, 10)): ans += 1 print(ans)