123612024-12-13 10:47:05birozsVilágnaptár (45 pont)python3Accepted 45/4517ms3324 KiB
ev,ho,nap = map(int,input().split())
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,30]
if ev % 4 == 0:
    szoko = True
    regi[1] = 29
else:
    szoko = False
EvNap = sum(regi[0:ho-1]) + nap
UjNap = 0
if szoko and ho == 7 and nap == 1:
    print(ev,6,"SZN")
elif ho == 12 and nap == 31:
    print(ev,12,"VN")
else:
    for i in range(12):
        for j in range(1,uj[i]+1):
            UjNap += 1
            if szoko and i+1 == 6 and j == 30:
                UjNap += 1
            if UjNap == EvNap:
                print(ev,i+1,j)
                break

SubtaskSumTestVerdictTimeMemory
base45/45
1Accepted0/016ms3128 KiB
2Accepted0/016ms3124 KiB
3Accepted0/017ms3128 KiB
4Accepted2/216ms3320 KiB
5Accepted2/217ms3320 KiB
6Accepted3/317ms3080 KiB
7Accepted3/317ms3120 KiB
8Accepted3/317ms3128 KiB
9Accepted3/317ms3152 KiB
10Accepted3/317ms3128 KiB
11Accepted3/316ms3128 KiB
12Accepted3/316ms3324 KiB
13Accepted3/317ms3068 KiB
14Accepted3/316ms3076 KiB
15Accepted3/316ms3104 KiB
16Accepted3/314ms3160 KiB
17Accepted3/317ms3128 KiB
18Accepted2/216ms3128 KiB
19Accepted3/316ms3124 KiB