116372024-11-02 11:23:17MagyarKendeSZLGVilágnaptár (45 pont)python3Accepted 45/4517ms3320 KiB
Y, M, D = map(int, input().split())
A = [31, 28 + (Y % 4 == 0), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
B = [31, 30, 30, 31, 30, 30 + (Y % 4 == 0), 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
print(Y, M, "SZN" if M == 6 and D == 31 else "VN" if M == 12 and D == 31 else D)
SubtaskSumTestVerdictTimeMemory
base45/45
1Accepted0/016ms3128 KiB
2Accepted0/016ms3132 KiB
3Accepted0/016ms3128 KiB
4Accepted2/216ms3128 KiB
5Accepted2/214ms3136 KiB
6Accepted3/316ms3312 KiB
7Accepted3/316ms3124 KiB
8Accepted3/316ms3124 KiB
9Accepted3/317ms3132 KiB
10Accepted3/316ms3128 KiB
11Accepted3/317ms3136 KiB
12Accepted3/316ms3144 KiB
13Accepted3/317ms3128 KiB
14Accepted3/316ms3128 KiB
15Accepted3/316ms3128 KiB
16Accepted3/316ms3128 KiB
17Accepted3/317ms3320 KiB
18Accepted2/216ms3072 KiB
19Accepted3/316ms3040 KiB