count = 0 for month in range(1, 13): for days in range(1, 31): if month == days: count += 1 if days >= 10: ans = int(days/10) + (days%10) if month == ans: count += 1 print(count)