98252024-03-08 19:33:03birozsÖntözés (50 pont)python3Accepted 50/50142ms16208 KiB
N,M = map(int,input().split())
def ablak(nap,db):
    return nap * 24 + db
lista = []
for i in range(N):
    A,x,B,y = map(int,input().split())
    if (ablak(B,y)-ablak(A,x)) % M == 0:
        lista.append((ablak(B,y)-ablak(A,x)) // M - 1)
    else:
        lista.append((ablak(B,y)-ablak(A,x)) // M)
    #print(ablak(B,y)-ablak(A,x))
for sor in lista:
    print(sor)
SubtaskSumTestVerdictTimeMemory
base50/50
1Accepted0/018ms11240 KiB
2Accepted0/035ms12124 KiB
3Accepted5/517ms12020 KiB
4Accepted5/5138ms14964 KiB
5Accepted3/317ms12068 KiB
6Accepted3/317ms12400 KiB
7Accepted3/317ms12624 KiB
8Accepted3/317ms12376 KiB
9Accepted3/317ms12764 KiB
10Accepted3/317ms12808 KiB
11Accepted3/318ms12764 KiB
12Accepted1/117ms12888 KiB
13Accepted1/117ms12652 KiB
14Accepted1/117ms12780 KiB
15Accepted1/117ms12924 KiB
16Accepted2/2142ms15896 KiB
17Accepted3/3138ms16124 KiB
18Accepted2/2136ms15924 KiB
19Accepted3/3140ms16076 KiB
20Accepted1/1137ms16208 KiB
21Accepted1/1135ms14428 KiB
22Accepted3/3136ms16056 KiB