Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
67198 陆宥呈 今年的第几天 Python3 Accepted 29 MS 3772 KB 420 2024-03-15 19:21:21

Tests(1/1):


Code:

def isLeap(n): if n % 400 == 0 or (n % 4 == 0 and n % 100 != 0): return True return False def cal(): if isLeap(y): tot[1] = 29 else: tot[1] = 28 total = 0 for i in range(m-1): totals = tot[i] total += totals total += d return total y,m,d = map(int,input().split()) tot = [31,30,31,30,31,30,31,31,30,31,31] res = cal() print(res)