本地题面缓存已迁移,解析内容待补充。
OJ: noi_openjudge
题目 ID: ch0113-18
难度:未知
标签:python
日期: 2026-07-30 23:01
题意
完整题面见同目录的 problem.md。
思路
代码
Python代码
python
year, month, day = map(int, input().split("-"))
def is_leap(current_year: int) -> bool:
return current_year % 400 == 0 or current_year % 4 == 0 and current_year % 100 != 0
month_lengths = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
month_lengths[1] += is_leap(year)
day += 1
if day > month_lengths[month - 1]:
day = 1
month += 1
if month == 13:
month = 1
year += 1
print(f"{year:04d}-{month:02d}-{day:02d}")