day = [0,31,28,31,30,31,30,31,31,30,31,30,31] cnt = 0 for i in range(1, 13): for j in range(1, day[i]): if i == j//10 + j%10: cnt += 1 print(cnt)