Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
93670 | 丁俊杰 | 今年的第几天 | Python3 | Accepted | 35 MS | 3772 KB | 468 | 2024-10-18 21:18:22 |
a=[31,28,31,30,31,30,31,31,30,31,30,31] #平年每个月的天数 x,y,z=map(int,input().split()) res=0 if (x%4==0 and x%100!=0) or x%400==0: #如果是润年的话 if y>=3: #如果是大于2月了 for i in range(y-1): res+=a[i] res=res+z+1 else: for i in range(y-1): res+=a[i] res+=z else: #是平年 for i in range(y-1): res+=a[i] res+=z print(res)