41182023-03-14 23:22:12kristofVilágnaptár (45 pont)python3Wrong answer 37/4517ms13368 KiB
year, months, day = map(int, input().split())
if months == 12 and day == 31:
    print(year, months, "VN")
elif months == 7 and day == 1:
    print(year, 6, "szN")

else:
    gregorian = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
    new = [31, 30, 30, 31, 30, 30, 31, 30, 30, 31, 30, 30]

    ind = 0

    if year % 4 == 0:
        gregorian[1] += 1

    #* how may days are there?
    for i in range(months-1):
        ind += gregorian[i]
    ind += day

    #TODO calculate in new calendar
    for i in range(12):
        if ind - new[i] <= 0:
            months = i+1
            break
        else:
            ind -= new[i]
    day = ind



    print(year, months, day)
SubtaskSumTestVerdictTimeMemory
base37/45
1Accepted0/017ms10996 KiB
2Wrong answer0/017ms11420 KiB
3Accepted0/017ms11740 KiB
4Accepted2/217ms11832 KiB
5Accepted2/217ms11964 KiB
6Accepted3/317ms11988 KiB
7Accepted3/317ms12552 KiB
8Accepted3/317ms12308 KiB
9Wrong answer0/317ms12464 KiB
10Wrong answer0/317ms12824 KiB
11Accepted3/317ms12760 KiB
12Accepted3/317ms12792 KiB
13Accepted3/317ms12868 KiB
14Accepted3/317ms13368 KiB
15Accepted3/317ms12908 KiB
16Accepted3/317ms13028 KiB
17Accepted3/317ms13308 KiB
18Wrong answer0/217ms13028 KiB
19Accepted3/317ms13268 KiB