57672023-09-22 12:17:06KezdőEgykorúak (75 pont)python3Wrong answer 15/75134ms14284 KiB
N = int(input())
s = 0
ho = [0,31,28,31,30,31,30,31,31,30,31,30,31]
for i in range(N+1):
    e,h,n = [int(i) for i in input().split()]
    nap = (e-1950)*365 + h*sum(ho[:h]) + n
    for j in range(1950,e):
        if j%4==0:
            nap += 1
    if e%4==0 and h>2:
        nap += 1
    if i == 0:
        P = nap
    elif abs(P-nap) <= 365:
        s += 1
print(s)
SubtaskSumTestVerdictTimeMemory
base15/75
1Wrong answer0/017ms11188 KiB
2Wrong answer0/0134ms11596 KiB
3Wrong answer0/517ms11800 KiB
4Accepted5/517ms11796 KiB
5Wrong answer0/517ms12152 KiB
6Accepted5/517ms11852 KiB
7Accepted5/517ms12052 KiB
8Wrong answer0/518ms12208 KiB
9Wrong answer0/520ms12128 KiB
10Wrong answer0/539ms12568 KiB
11Wrong answer0/539ms12644 KiB
12Wrong answer0/550ms12984 KiB
13Wrong answer0/559ms13076 KiB
14Wrong answer0/570ms13528 KiB
15Wrong answer0/581ms13332 KiB
16Wrong answer0/596ms13696 KiB
17Wrong answer0/5109ms14284 KiB