jgzquanquan : 章鱼哥没有日历(Pyhton实现)
7 年,5 月前
str_in = input()
a = [int(n) for n in str_in.split(‘-‘)]
month=int(a[1])
day=int(a[2])
mon=[0,31,28,31,30,31,30,31,31,30,31,30,31]
if month>12 or month<=0:
print(‘-1’)
else:
if day<=0 or day>mon[month]:
print(‘-1’)
else:
...查看全文