import datetime
n=input()
year = int(n[:4])
mouth = int(n[4:6])
day = int(n[6:8])
start_date = datetime.date(year,mouth,day)
delta = datetime.timedelta(1)
date_ls = list(str(start_date))
while True:
start_date = start_date+delta
date_ls = list(str(start_date))
date_ls.remove('-')
date_ls.remove('-')
if date_ls==date_ls[-1::-1]:
break
while True:
date_ls1 = list(str(start_date))
date_ls1.remove('-')
date_ls1.remove('-')
if date_ls1[0]==date_ls1[2]==date_ls1[5]==date_ls1[7] and date_ls1[1]==date_ls1[3]==date_ls1[4]==date_ls1[6]:
break
start_date = start_date+delta
for i in date_ls:
print(i,end='')
print()
for i in date_ls1:
print(i,end='')
0.0分
4 人评分
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:512 |
C语言程序设计教程(第三版)课后习题8.7 (C语言代码)浏览:934 |
【蟠桃记】 (C语言代码)浏览:1084 |
C语言程序设计教程(第三版)课后习题5.5 (C语言代码)浏览:590 |
C语言程序设计教程(第三版)课后习题5.6 (C语言代码)浏览:537 |
演讲大赛评分 (C语言代码)浏览:1697 |
C二级辅导-分段函数 (C语言代码)浏览:659 |
简单的a+b (C语言代码)浏览:857 |
【计算直线的交点数】 (C语言代码)浏览:986 |
C二级辅导-等差数列 (C语言代码)浏览:831 |