| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 68232 | 金浩 | 18岁生日 | Python3 | Wrong Answer | 30 MS | 3804 KB | 681 | 2024-03-21 10:47:59 |
def leyear(y): if y%400==0 or (y%4==0 and y%100!=0): return True else: return False n=input() n_list=n.split() c=0 for i in range(len(n_list)): if n_list[i][5:7]=="01" or n_list[i][5:7]=="02": if n_list[i][5:7]=="02" and n_list[i][8:]=="29": print(-1) else: for j in range(18): if leyear(int(n_list[i][:4])+j): c+=366 else: c+=365 print(c) else: for j in range(18): if leyear(int(n_list[i][:4])+j+1): c+=366 else: c+=365 print(c)
------Input------
11 1989-11-26 1962-12-02 1963-03-27 1990-03-31 1900-02-28 2000-02-29 2008-08-08 1995-02-28 2012-02-29 2020-02-28 1982-03-01
------Answer-----
6574 6575 6575 6575 6574 -1 6574 6575 -1 6575 6575
------Your output-----
6575