Blue Bridge Cup python group - guess birthday
import os
import sys
import datetime
start=datetime.date(1912,3,12)
end=datetime.date(2012,3,12)
add=datetime.timedelta(1)
while start<=end:
start+=add
if int(str(start)[:10].replace('-',''))%2012==0 and \
int(str(start)[:10].replace('-',''))%3==0 and \
int(str(start)[:10].replace('-',''))%12==0 and start.month==6:
print(int(str(start)[:10].replace('-','')))
break
#一开始输出的结果是有57岁了,有点不太相信,应该是大明不是小明了
Note: \ in the code represents a newline, and one line cannot be written. . . . .
The answer is 19550604
Thank you for your support. Your one-click three-connection is the biggest driving force for Ganggang students!