解题思路:
注意事项:
参考代码:
def isy(st): if st%100==0: if st%400==0: return 1 else: return 0 else: if st%4==0: return 1 else: return 0 dic={1:31,3:31,5:31,7:31,9:30,11:30,2:28,4:30,6:30,8:31,10:31,12:31} while True: try: a,b,c=map(int,input().split('/')) s = 0 for i in range(1,b): s += dic[i] s += c if isy(a)==1 and b>2: print(s+1) else: print(s) except: break
0.0分
0 人评分