116362024-11-02 11:18:58MagyarKendeSZLGVilágnaptár (45 pont)python3Accepted 45/4516ms3312 KiB
Y, M, D = map(int, input().split())
A = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] if Y % 4 == 0 else [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
B = [31, 30, 30, 31, 30, 31, 31, 30, 30, 31, 30, 31] if Y % 4 == 0 else [31, 30, 30, 31, 30, 30, 31, 30, 30, 31, 30, 31]

for i in range(M - 1):
    D += A[i]
M = 1
for i in range(12):
    if B[i] < D:
        M += 1
        D -= B[i]
    else:
        break

if M == 6 and D == 31:
    print(Y, M, "SZN")
elif M == 12 and D == 31:
    print(Y, M, "VN")
else:
    print(Y, M, D)
SubtaskSumTestVerdictTimeMemory
base45/45
1Accepted0/016ms3112 KiB
2Accepted0/016ms3312 KiB
3Accepted0/016ms3128 KiB
4Accepted2/216ms3128 KiB
5Accepted2/216ms3068 KiB
6Accepted3/314ms2976 KiB
7Accepted3/316ms3016 KiB
8Accepted3/316ms3088 KiB
9Accepted3/316ms3136 KiB
10Accepted3/316ms3140 KiB
11Accepted3/316ms3128 KiB
12Accepted3/316ms3128 KiB
13Accepted3/316ms3000 KiB
14Accepted3/316ms3176 KiB
15Accepted3/316ms2976 KiB
16Accepted3/314ms2976 KiB
17Accepted3/316ms3132 KiB
18Accepted2/216ms3064 KiB
19Accepted3/316ms3128 KiB