208822026-01-10 19:24:21vyrallVilágnaptár (45 pont)python3Accepted 45/4517ms3328 KiB
year, month, m_day = map(int, input().split())
szoko = year % 4 == 0
regi = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
uj = [31, 30, 30, 31, 30, 30, 31, 30, 30, 31, 30, 31]
if szoko:
    regi[1] = 29
    uj[5] = 31

day = sum(regi[:month - 1]) + m_day
for i in range(12):
    if day - sum(uj[:i]) <= uj[i]:
        new_month = i + 1
        new_m_day = day - sum(uj[:i])
        break

if new_month == 6 and new_m_day == 31:
    new_m_day = "SZN"
if new_month == 12 and new_m_day == 31:
    new_m_day = "VN"

print(year, new_month, new_m_day)
SubtaskSumTestVerdictTimeMemory
base45/45
1Accepted0/016ms3124 KiB
2Accepted0/014ms2956 KiB
3Accepted0/016ms3128 KiB
4Accepted2/216ms3124 KiB
5Accepted2/216ms3328 KiB
6Accepted3/317ms3324 KiB
7Accepted3/317ms3124 KiB
8Accepted3/317ms3124 KiB
9Accepted3/316ms2968 KiB
10Accepted3/316ms3068 KiB
11Accepted3/316ms3080 KiB
12Accepted3/316ms3000 KiB
13Accepted3/317ms3124 KiB
14Accepted3/317ms3112 KiB
15Accepted3/317ms3124 KiB
16Accepted3/316ms3144 KiB
17Accepted3/316ms3112 KiB
18Accepted2/216ms2988 KiB
19Accepted3/316ms3124 KiB