import datetime def main(): printday = datetime.datetime(2015, 1, 1) puluse = datetime.timedelta(days=1) cnt=0 for i in range(365): m = printday.month d = printday.day%10 + printday.day//10 if m == d: cnt = cnt + 1 printday = printday + puluse print(cnt) if __name__=="__main__": main()