Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
108787 | 展博 | 今年的第几天 | Python3 | Accepted | 40 MS | 3776 KB | 383 | 2025-01-22 09:35:17 |
def day_of_year(year, month, day): days_per_month = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] if (year % 4 == 0 and year % 100 != 0) or (year % 400 == 0): days_per_month[1] = 29 total_days = sum(days_per_month[:month - 1]) total_days += day return total_days a,b,c=input().split() a,b,c=int(a),int(b),int(c) print(day_of_year(a,b,c))