ZhenlongDai/ACPR huggingface dataset:
Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h1,m1,h2,m2,k=map(int,input().split())

h1_m = h1 + m1/60
h2_m = h2 + m2/60

h = h2_m-h1_m

print(int(h*60-k))

Failing test case input:
6 -1 16 1 0

Expected output:
602


Actual output:
601


Fixed submission (verdict: Accepted):
h1,m1,h2,m2,k=map(int,input().split())

h1_m = h1*60 + m1
h2_m = h2*60 + m2

h = h2_m-h1_m
h = h - k
print(h)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
H1,M1,H2,M2,K = map(int,input().split())
print(60*H2 + M2 - (60*H1 + M2) - K)

Failing test case input:
0 -13 83 26 0

Expected output:
5019


Actual output:
4980


Fixed submission (verdict: Accepted):
H1,M1,H2,M2,K = map(int,input().split())
if (H1, M1) > (H2, M2):
	H2 += 24
print(max(0, 60*H2 + M2 - (60*H1 + M1) - K))

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def main():
    array = list(map(int, input().split()))

    now = array[0]*60+array[1]
    finish = array[2]*60+array[3]
    K = array[4]
    ans = 0
    for _ in range(1000000):
        if now + K < finish:
            ans += K
            now += K
        else:
            break

    print(ans)


if __name__ == '__main__':
    main()


Failing test case input:
31 -1 620 6 -1

Expected output:
35348


Actual output:
-1000000


Fixed submission (verdict: Accepted):
def main():
    array = list(map(int, input().split()))

    now = array[0]*60+array[1]
    finish = array[2]*60+array[3]

    sa = finish - now
    K = array[4]
    ans = 0
    for _ in range(int(1e15)):
        if now + K < finish:
            ans += 1
        else:
            break
        now += 1

    print(ans)


if __name__ == '__main__':
    main()

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
H1, M1, H2, M2, K = map(int, input().split())
m = (H2 * 60 + M2) - (H1 * 60 - M1)
print(m - K)


Failing test case input:
-1 -3 436 6 0

Expected output:
26229


Actual output:
26223


Fixed submission (verdict: Accepted):
H1, M1, H2, M2, K = map(int, input().split())
m = (H2 * 60 + M2) - (H1 * 60 + M1)
print(m - K)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

h1, m1, h2, m2, k = map(int,input().split())



time = h2*60+m2 - (h1*60+m2)
print(time-k)


Failing test case input:
31 -1 620 3 -1

Expected output:
35345


Actual output:
35341


Fixed submission (verdict: Accepted):

h1, m1, h2, m2, k = map(int,input().split())



time = h2*60+m2 - (h1*60+m1)
print(time-k)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h1, m1, h2, m2, k = map(int, input().split())

ans = (h2*60+m2-h1*60+m1) - k
print(ans)


Failing test case input:
6 -1 16 1 0

Expected output:
602


Actual output:
600


Fixed submission (verdict: Accepted):
h1, m1, h2, m2, k = map(int, input().split())

ans = (h2*60+m2-(h1*60+m1)) - k
print(ans)
Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h1, m1, h2, m2, k = map(int,input().split())

minutes = (h2-h1)*60 - (m2-m1)
print(max(0,minutes-k))

Failing test case input:
-1 -3 1397 6 0

Expected output:
83889


Actual output:
83871


Fixed submission (verdict: Accepted):
h1, m1, h2, m2, k = map(int,input().split())

minutes = (h2-h1)*60 + (m2-m1)
print(max(0,minutes-k))

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
HMK = list(map(int, input().split()))
H1 = HMK[0]
M1 = HMK[1]
H2 = HMK[2]
M2 = HMK[3]
K = HMK[4]
ans = ((H2 - H1) * 60 + (M1 + M2)) - K
print(ans)


Failing test case input:
-1 -9 68 14 -1

Expected output:
4164


Actual output:
4146


Fixed submission (verdict: Accepted):
HMK = list(map(int, input().split()))
H1 = HMK[0]
M1 = HMK[1]
H2 = HMK[2]
M2 = HMK[3]
K = HMK[4]
if H2 < H1:
	H2 += 24
ans = ((H2 - H1) * 60 + (M2 - M1)) - K
print(ans)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h,m,h2,m2,k = map(int,input().split())

h3 =(h2-h)*60
print(h3-k)

Failing test case input:
17 -4 435 6 -1

Expected output:
25091


Actual output:
25081


Fixed submission (verdict: Accepted):
h,m,h2,m2,k = map(int,input().split())

k3 =h2*60+m2
k2 =h*60+m
print(k3-k2-k)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
hmk = input('')

h1 = int(hmk.split(' ')[0])
m1 = int(hmk.split(' ')[1])
h2 = int(hmk.split(' ')[2])
m2 = int(hmk.split(' ')[3])
k = int(hmk.split(' ')[4])

h = h2 - h1
m = m2 - m1
if m1 > m2:
    m = m1 - m2
    h-=1

a = h*60 + m - k
print(a)

Failing test case input:
8 0 12 -1 22

Expected output:
217


Actual output:
159


Fixed submission (verdict: Accepted):
hmk = input('')

h1 = int(hmk.split(' ')[0])
m1 = int(hmk.split(' ')[1])
h2 = int(hmk.split(' ')[2])
m2 = int(hmk.split(' ')[3])
k = int(hmk.split(' ')[4])

min1 = h1*60 + m1
min2 = h2*60 + m2

if min1 > min2:
    min2+=60*24

a = min2 - min1 - k
print(a)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h1, m1, h2, m2, K = list(map(int, input().split()))
if abs(h1-h2)*60 + abs(m1-m2) < K:
    print('{}'.format(0))
else:
    print('{}'.format(abs(h1-h2)*60 + abs(m1-m2) - K))


Failing test case input:
11 0 12 -1 29

Expected output:
30


Actual output:
32


Fixed submission (verdict: Accepted):
h1, m1, h2, m2, K = list(map(int, input().split()))
if (h2 - h1)*60 + (m2-m1) < K:
    print('{}'.format(0))
else:
    print('{}'.format((h2 - h1)*60 + (m2-m1) - K))

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
H1, H2, H3, H4, K = map(int, input().split())
up = H1*60+H2
down = H3*60-H4
print(down-up-K)

Failing test case input:
0 -8 722 6 0

Expected output:
43334


Actual output:
43322


Fixed submission (verdict: Accepted):
H1, H2, H3, H4, K = map(int, input().split())
up = H1*60 + H2
down = H3*60 + H4
print(down - up - K)
Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h1,m1,h2,m2,k=map(int,input().split())

if m1<=m2:
    print((h2-h1)*60+m2-m1-k)
else:
    print((h2-h1)*60+m2+60-m1-k)

Failing test case input:
11 0 12 -1 29

Expected output:
30


Actual output:
90


Fixed submission (verdict: Accepted):
h1,m1,h2,m2,k=map(int,input().split())

if m1<=m2:
    print(max((h2-h1)*60+m2-m1-k,0))
else:
    print(max((h2-h1-1)*60+m2+60-m1-k,0))

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
H1, M1, H2, M2, K=map(int, input().split())

if H1==H2:
    x=M2-M1
    print(x-K)
else:
    ms=(60-M1)+(H2-H1-1)*60-K
    print(ms)

Failing test case input:
1 -7 28 1 1

Expected output:
1627


Actual output:
1626


Fixed submission (verdict: Accepted):
H1, M1, H2, M2, K=map(int, input().split())

if H1==H2:
    x=M2-M1
    ms=x-K
else:
    ms=(60-M1)+(H2-H1-1)*60+M2-K
print(max(0, ms))

Problem: p02663
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
H1, M1, H2, M2, K = map(int, input().split())
ans = 60*H2+M2 - 60*H1+M1 - K
print(ans)

Failing test case input:
10 -1 15 0 25

Expected output:
276


Actual output:
274


Fixed submission (verdict: Accepted):
H1, M1, H2, M2, K = map(int, input().split())
ans = 60*H2+M2 - (60*H1+M1) - K
print(ans)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h1,m1,h2,m2,k = map(int,input().split())

time = (h2 - h1) * 60 - (m2 - m1)
print(time - k)

Failing test case input:
1 -7 42 1 1

Expected output:
2467


Actual output:
2451


Fixed submission (verdict: Accepted):
h1,m1,h2,m2,k = map(int,input().split())

time = (h2 - h1) * 60 + (m2 - m1)
print(time - k)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h1, m1, h2, m2, k = map(int, input().split())
time1 = h1*60+m1
time2 = h2*60+m1
print(time2-time1-k)


Failing test case input:
16 -1 620 3 -1

Expected output:
36245


Actual output:
36241


Fixed submission (verdict: Accepted):
h1, m1, h2, m2, k = map(int, input().split())
time1 = h1*60+m1
time2 = h2*60+m2
print(time2-time1-k)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h1,m1,h2,m2,k = map(int,input().split())
if m2 < m1:
	m2 += 60
if m2 < m1:
    h2 -= 1
m = m2-m1
h = h2-h1
print(60*h+m-k)


Failing test case input:
11 0 12 -1 34

Expected output:
25


Actual output:
85


Fixed submission (verdict: Accepted):
h1,m1,h2,m2,k = map(int,input().split())
if h2 < h1:
    h2 += 24
if m2 < m1:
    m2 += 60
    h2 -= 1
print((h2-h1)*60+m2-m1-k)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h1, m1, h2, m2, k = list(map(int, input().split()))

time = (h2 - h1) * 60 + abs(m1 - m2) - k

print(time)

Failing test case input:
11 0 12 -1 34

Expected output:
25


Actual output:
27


Fixed submission (verdict: Accepted):
h1, m1, h2, m2, k = list(map(int, input().split()))
time = (h2 * 60 + m2) - (h1 * 60 + m1) - k
print(time)
Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h1,m1,h2,m2,k =(int(x) for x in input().split())  

hrtom= (h2-h1)

if m2-m1 < 0 : 
    min = (h2-h1)*60 - (m2-m1) - k

else:
     min = (h2-h1)*60 + (m2-m1) -k 
    
print(min)
    

Failing test case input:
4 0 12 -1 22

Expected output:
457


Actual output:
459


Fixed submission (verdict: Accepted):
h1,m1,h2,m2,k =(int(x) for x in input().split())  
 
hrtom= (h2-h1)
 
if (m2-m1 < 0) and (h2-h1 >=0) : 
    min = (h2-h1)*60 + (m2-m1) - k
    print(min)
    
elif (m2-m1 >= 0) and (h2-h1 >=0 ):
    min = (h2-h1)*60 + (m2-m1) - k 
    print(min)

    

else:
    print('0')

Problem: p02663
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):


import math

h1, m1, h2, m2, k = map(int, input().split())

if m1 < m2:
    h2 -= 1
    m2 = 60

if h1 > h2:
    h2 += 24

allMin = (h2 - h1) * 60 + (m2 - m1)

res = allMin - k
if res < 0:
    res = 0

print(res)


Failing test case input:
0 -8 722 6 -1

Expected output:
43335


Actual output:
43329


Fixed submission (verdict: Accepted):


import math

h1, m1, h2, m2, k = map(int, input().split())

if h2 < h1:
    h2 += 24

if m2 < m1:
    h2 -= 1
    m2 += 60

allMin = (h2 - h1) * 60 + (m2 - m1)

res = allMin - k
if res < 0:
    res = 0

print(res)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h1,m1,h2,m2,k=map(int,input().split())
ans=h2*60+m2-k-h1*60+m1
print(ans)

Failing test case input:
1 -7 200 19 0

Expected output:
11966


Actual output:
11952


Fixed submission (verdict: Accepted):
h1,m1,h2,m2,k=map(int,input().split())
ans=h2*60+m2-k-h1*60-m1
print(ans)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

 
H1, M1, H2, M2, K = [int(i) for i in input().split()]
 
awake_time = H1 *60 + M1
sleep_time = H2 *60 + M1
start_limit_time = sleep_time - K
 
can_study_time = start_limit_time - awake_time
 
print(can_study_time)

Failing test case input:
11 -4 722 6 -1

Expected output:
42671


Actual output:
42661


Fixed submission (verdict: Accepted):
import sys


 
H1, M1, H2, M2, K = map(int, sys.stdin.read().split())
 
awake_time = H1 *60 + M1
sleep_time = H2 *60 + M2
start_limit_time = sleep_time - K
can_study_time = start_limit_time - awake_time
 
print(can_study_time)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
H1, M1, H2, M2, K = [int(s) for s in input().split()]
if H2 < H1:
    H2 += 24
elif H2 == H1 and M1 > M2:
    H2 += 24
print(H2 * 60 + M2 - H1 * 60 + M1 - K)


Failing test case input:
0 -11 1302 6 0

Expected output:
78137


Actual output:
78115


Fixed submission (verdict: Accepted):
H1, M1, H2, M2, K = [int(s) for s in input().split()]
if H2 < H1:
    H2 += 24
elif H2 == H1 and M1 > M2:
    H2 += 24
print(int(H2 * 60 + M2 - (H1 * 60 + M1) - K))
Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
H1, M1, H2, M2, K = map(int,input().split())
time = (H2 * 60 + M2) - (H1 * 60 + M1) - 1
ans = time 
print(ans)

Failing test case input:
1 -26 83 26 -1

Expected output:
4973


Actual output:
4971


Fixed submission (verdict: Accepted):
H1, M1, H2, M2, K = map(int,input().split())
time = (H2 * 60 + M2) - (H1 * 60 + M1)
ans = max(0, time - K)
print(ans)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b,c,d,e=map(int,input().split())

x=((c*60-d)-(a*60+b))-e

if x<0:
    x=x+1440
print(x)


Failing test case input:
0 -11 903 6 0

Expected output:
54197


Actual output:
54185


Fixed submission (verdict: Accepted):
a,b,c,d,e=map(int,input().split())

x=((c*60+d)-(a*60+b))-e

if x<0:
    x=x+1440
print(x)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h1, m1, h2, m2, K = list(map(int, input().split()))
if abs(h1-h2)*60 + abs(m1-m2) <= K:
    print('{}'.format(0))
else:
    print('{}'.format(abs(h1-h2)*60 + abs(m1-m2) - K))

Failing test case input:
11 0 12 -1 34

Expected output:
25


Actual output:
27


Fixed submission (verdict: Accepted):
h1, m1, h2, m2, K = list(map(int, input().split()))
if (h2 - h1)*60 + (m2-m1) < K:
    print('{}'.format(0))
else:
    print('{}'.format((h2 - h1)*60 + (m2-m1) - K))

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = list(map(int, input().split()))
h = (x[2] - x[0])*60
m = x[3] - x[1]
if m < 0:
    h -= 1
    m = 60 - x[1] + x[3]
ans = max(m+h-x[-1], 0)
print(ans)


Failing test case input:
11 0 12 -1 34

Expected output:
25


Actual output:
84


Fixed submission (verdict: Accepted):
x = list(map(int, input().split()))
h = (x[2] - x[0])*60
m = x[3] - x[1]
if m < 0:
    h -= 60
    m = 60 - x[1] + x[3]
ans = max(m+h-x[-1], 0)
print(ans)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):






def çözmek():
    h, m, H, M, K = map(int, input().split(" "))
    if H:
        H = H * 60
    if h: 
        h = h * 60
    res = H + M - K - h + m
    print(res)
if __name__ == "__main__":
    çözmek()


Failing test case input:
17 -4 435 6 -1

Expected output:
25091


Actual output:
25083


Fixed submission (verdict: Accepted):






def çözmek():
    h, m, H, M, K = map(int, input().split(" "))
    if H != 0:
        H = H * 60
    if h != 0:
        h = h * 60
    res = H + M - K - h - m
    print(res)
if __name__ == "__main__":
    çözmek()

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a, b, c, d,e  = map(int,input().split())
minute = (c-a)*60-(d-b)
if minute<=e:
    print(0)
else:  
    print(minute-e)

Failing test case input:
1 -7 200 1 0

Expected output:
11948


Actual output:
11932


Fixed submission (verdict: Accepted):
a, b, c, d,e  = map(int,input().split())
minute = (c-a)*60+(d-b)
if minute<=e:
    print(0)
else:  
    print(minute-e)
Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
H1,M1,H2,M2,K=map(int, input().split())

if H1 > H2:
  hour = H2+(24-H1)
else:
  hour = H2-H1

if M1 > M2:
  hour -= 1
  minutes = abs(M2-M1)
else:
  minutes = M2-M1

print(hour*60+minutes-K)


Failing test case input:
4 0 12 -1 22

Expected output:
457


Actual output:
399


Fixed submission (verdict: Accepted):
H1,M1,H2,M2,K=map(int, input().split())

if H1 > H2:
  hour = H2+(24-H1)
else:
  hour = H2-H1

if M1 > M2:
  hour -= 1
  minutes = M2+(60-M1)
else:
  minutes = M2-M1
print(hour*60+minutes-K)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
H,M,h,m,K = map(int,input().split())
A = H*60 + M
B = h*60 + m
X = B - A - K
print(min(X,0))


Failing test case input:
6 -1 80 6 -1

Expected output:
4448


Actual output:
0


Fixed submission (verdict: Accepted):
H,M,h,m,K = map(int,input().split())
A = H*60 + M
B = h*60 + m
X = B - A - K
print(X)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
H1, M1, H2, M2, K = map(int, input().split())
print(60 * (H2 - H1) - (M2 - M1) - K) 

Failing test case input:
6 -1 80 6 -1

Expected output:
4448


Actual output:
4434


Fixed submission (verdict: Accepted):
H1, M1, H2, M2, K = map(int, input().split())
awake = 60 * (H2 - H1) + (M2 - M1)
print(awake - K)

Problem: p02663
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
h1, m1, h2, m2, k = map(int, input().split())
 
if h1 <= h2:
    time = h2 * 60 + m2 - h1 * 60 + m1
else:
    time = (h2+24) * 60 + m2 - h1 * 60 + m1
if k >= time:
    print(0)
else:
    print(time - k)


Failing test case input:
16 -1 337 3 0

Expected output:
19264


Actual output:
19262


Fixed submission (verdict: Accepted):
h1, m1, h2, m2, k = map(int, input().split())
 
if h1 <= h2:
    time = h2 * 60 + m2 - h1 * 60 - m1
else:
    time = (h2+24) * 60 + m2 - h1 * 60 - m1
if k >= time:
    print(0)
else:
    print(time - k)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
num_list = list(map(int, input().split())) 

a=num_list[2]-num_list[0]
b=num_list[3]-num_list[1]
if b>0:
    a=a-1
a=a*60
c=b+a-num_list[4]
print(c)

Failing test case input:
1 -7 42 1 1

Expected output:
2467


Actual output:
2407


Fixed submission (verdict: Accepted):


num_list = list(map(int, input().split())) 

a=num_list[2]-num_list[0]
b=num_list[3]-num_list[1]
if b<0:
    a=a-1
    b=b+60
a=a*60
c=b+a-num_list[4]
if c<0:
    c=0
print(c)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h,m,H,M,k = map(int,input().split())
tmp = (60*H+M)-(60*h+m)-0.0000001
a = tmp
ans = k*a
print(int(ans))

Failing test case input:
11 -1 12 -1 29

Expected output:
31


Actual output:
1739


Fixed submission (verdict: Accepted):
h,m,H,M,k = map(int,input().split())
tmp = (60*H+M)-(60*h+m)
ans = tmp - k
print(int(ans))
Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h1, m1, h2, m2, k = [int(_) for _ in input().split()]

x = (h2 - h1) * 60 + m2 - m1 - k
if m1 > m2:
    x -= 60

print(x)


Failing test case input:
8 0 12 -1 34

Expected output:
205


Actual output:
145


Fixed submission (verdict: Accepted):
h1, m1, h2, m2, k = [int(_) for _ in input().split()]

print((h2 - h1) * 60 + m2 - m1 - k)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b,c,d,e = map(int,input().split())
x = abs(a - c) * 60 - e
if x < 0:
    print(0)
else:
    print(x)

Failing test case input:
1 -7 28 1 1

Expected output:
1627


Actual output:
1619


Fixed submission (verdict: Accepted):
a,b,c,d,e = map(int,input().split())
x = abs(a - c) * 60 - b + d - e
if x < 0:
    print(0)
else:
    print(x)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h1, m1, h2, m2, k = map(int, input().split())

h1h2 = abs((h1-h2)*60)
m1m2 = abs(m1-m2)

print(h1h2-m1m2-k)

Failing test case input:
-1 -9 68 14 -1

Expected output:
4164


Actual output:
4118


Fixed submission (verdict: Accepted):
h1, m1, h2, m2, k = map(int, input().split())
hm = ((h2-h1)*60)-(m1-m2)-k
print(hm)

Problem: p02663
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
h, m, x, y, k = map(int, input().split())
mi = x*60 + y - h*60+m - k
print(mi)

Failing test case input:
0 -11 1486 6 0

Expected output:
89177


Actual output:
89155


Fixed submission (verdict: Accepted):
h, m, x, y, k = map(int, input().split())
mi = x*60 + y - (h*60+m) - k
print(mi)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h1, m1, h2, m2, k = map(int, input().split())
h1 = 12 - h1
h2 = h2 -12
x = abs(h2 + h1) * 60 + m1 + m2 - k
print(x)

Failing test case input:
6 -1 27 1 0

Expected output:
1262


Actual output:
1260


Fixed submission (verdict: Accepted):
h1, m1, h2, m2, k = map(int, input().split())
print(h2 * 60 - h1 * 60 + m2 - m1 - k)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
H1, M1, H2, M2, K = map(int, input().split())
print(max(60 * (H2 - H1) - (M2 - M1) - K, 0))

Failing test case input:
2 -41 83 33 0

Expected output:
4934


Actual output:
4786


Fixed submission (verdict: Accepted):
H1, M1, H2, M2, K = map(int, input().split())
awake = 60 * (H2 - H1) + (M2 - M1)
print(awake - K)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h1,m1,h2,m2,k=map(int,input().split())
print(h1*60+m1-k-m2-60*h2)

Failing test case input:
11 0 12 -1 29

Expected output:
30


Actual output:
-88


Fixed submission (verdict: Accepted):
h1,m1,h2,m2,k=map(int,input().split())
print(h2*60+m2-k-m1-60*h1)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
H1, M1, H2, M2, K = map(int, input().split())
hour = H2 - H1
minute = (hour * 60) - K
print(minute)

Failing test case input:
-1 -3 903 6 0

Expected output:
54249


Actual output:
54240


Fixed submission (verdict: Accepted):
H1, M1, H2, M2, K = map(int, input().split())

hour1 = (H1 * 60) + M1
hour2 = (H2 * 60) + M2
hour = hour2 - hour1
minute = hour - K
print(minute)
Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h1, m1, h2, m2, m = map(int, input().split())

if m2 < m1:
    mm = m2 + 60 - m1
else:
    mm = m2 - m1

t = (h2 - h1) * 60 + mm

if t < m:
    print(0)
else:
    print(t - m)

Failing test case input:
11 0 12 -1 43

Expected output:
16


Actual output:
76


Fixed submission (verdict: Accepted):
h1, m1, h2, m2, m = map(int, input().split())

if m2 < m1:
    mm = m2 - m1
else:
    mm = m2 - m1

t = (h2 - h1) * 60 + mm

if t < m:
    print(0)
else:
    print(t - m)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h1, m1, h2, m2, k = [int(i) for i in input().split()]

time = 60*h2+m2 - 60*h1+m1 - k
if time > 0:
  print(time)
else:
  print(0)

Failing test case input:
1 -7 28 1 1

Expected output:
1627


Actual output:
1613


Fixed submission (verdict: Accepted):
h1, m1, h2, m2, k = [int(i) for i in input().split()]

awake = 60*h2+m2 - (60*h1+m1) - k
print(awake)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
string = input()
nums = string.split(' ')

hour = int(nums[2]) - int(nums[0])
minute = int(nums[1]) - int(nums[3])
time = hour * 60 + minute - int(nums[4])

if time > 0:
    print(time)
else:
    print(0)


Failing test case input:
16 -1 206 3 0

Expected output:
11404


Actual output:
11396


Fixed submission (verdict: Accepted):
string = input()
nums = string.split(' ')

hour = int(nums[2]) - int(nums[0])
minute = int(nums[3]) - int(nums[1])
time = hour * 60 + minute - int(nums[4])

print(time)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h1, m1, h2, m2, k = map(int, input().split())
t1 = 60 * h1 + m1
t2 = 60 * h2 * m2
print(t2 - t1 - k)

Failing test case input:
1 -69 128 19 0

Expected output:
7708


Actual output:
145929


Fixed submission (verdict: Accepted):
h1, m1, h2, m2, k = map(int, input().split())
t1 = 60 * h1 + m1
t2 = 60 * h2 + m2
print(t2 - t1 - k)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h1,m1,h2,m2,k = map(int,input().split())

h = abs(h2-h1)
m = (m2-m1)
if m < 0:
    m+=60

ans = h*60+m
ans = ans-k

print(ans)

Failing test case input:
8 0 12 -1 34

Expected output:
205


Actual output:
265


Fixed submission (verdict: Accepted):
h1,m1,h2,m2,k = map(int,input().split())

h = h2-h1
m = m2-m1
if m < 0:
    m+=60
    h-=1

ans = h*60+m
ans = ans-k

print(ans)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h1, m1, h2, m2, k = map(int, input().split())

time1 = h1*60 + m1
time2 = h2*60 - m2

ans = time2 - k - time1
print(ans)


Failing test case input:
4 0 12 -1 22

Expected output:
457


Actual output:
459


Fixed submission (verdict: Accepted):
h1, m1, h2, m2, k = map(int, input().split())

time1 = h1*60 + m1
time2 = h2*60 + m2

ans = time2 - k - time1
print(ans)
Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
H1, M1, H2, M2, K = map(int, input().split())
awake = 60 * (H2 - H1) - (M2 - M1)
if awake < 0:
    awake += 24 * 60
print(awake - K)

Failing test case input:
17 -4 722 6 -1

Expected output:
42311


Actual output:
42291


Fixed submission (verdict: Accepted):
H1, M1, H2, M2, K = map(int, input().split())
awake = 60 * (H2 - H1) + (M2 - M1)
print(awake - K)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
H,M,h,m,K = map(int,input().split())

ans=(h*60+m)-(H*60+m)-K

print(ans)

Failing test case input:
-1 -9 92 14 -2

Expected output:
5605


Actual output:
5582


Fixed submission (verdict: Accepted):
H,M,h,m,K = map(int,input().split())

ans=(h*60+m)-(H*60+M)-K

print(int(ans))

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
H1, M1, H2, M2, K = map(int,input().split())
T1 = H1*60 + M1
T2 = H2*60 - M2
T = T2 - T1
print(T - K)

Failing test case input:
1 -41 128 19 0

Expected output:
7680


Actual output:
7642


Fixed submission (verdict: Accepted):
H1, M1, H2, M2, K = map(int, input().split())
T1 = H1 * 60 + M1
T2 = H2 * 60 + M2
T = T2 - T1
print(T - K)

Problem: p02663
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
import sys
input = lambda: sys.stdin.readline().rstrip()

h1, m1, h2, m2, k = map(int, input().split())

m = (h2 - h1)*60
a = m2 - m1 if m2 - m1 >= 0 else 60 + m2 - m1

print(m + a - k)

Failing test case input:
8 0 12 -1 34

Expected output:
205


Actual output:
265


Fixed submission (verdict: Accepted):
import sys
input = lambda: sys.stdin.readline().rstrip()

h1, m1, h2, m2, k = map(int, input().split())

m = 60 - m1
h1 += 1
m += (h2 - h1)*60 + m2
print(max(0, m - k))

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h1, m1, h2, m2, k = map(int, input().split())
m1_ = 60 - m1
m2_ = 60-m2
h_ = h2-h1+1
print(h_*60+m2-m1_-k)


Failing test case input:
1 -41 128 19 0

Expected output:
7680


Actual output:
7598


Fixed submission (verdict: Accepted):
h1, m1, h2, m2, k = map(int, input().split())
time1 = h1*60+m1
time2 = h2*60+m2
print(time2-time1-k)

Problem: p02663
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
h1,m1,h2,m2,k=map(int,input().split())
h=h2-h1
m=m2-m1
t=h*60+m
print(min(t-k,0))

Failing test case input:
1 -41 128 33 0

Expected output:
7694


Actual output:
0


Fixed submission (verdict: Accepted):
h1,m1,h2,m2,k=map(int,input().split())
h=h2-h1
m=m2-m1
t=h*60+m
print(max(t-k,0))

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h1 , m1 , h2 , m2 , k = map(int , input().split())
diff = (h2-h1)*60 + abs(m2-m1)
ans = diff - k
print(diff,ans)
if ans <=0:
	print(0)
else:
	print(ans)

Failing test case input:
-1 -9 68 14 -1

Expected output:
4164


Actual output:
4163 4164
4164


Fixed submission (verdict: Accepted):

h1 , m1 , h2 , m2 , k = map(int , input().split())
hr = h2-h1
m = m2-m1

diff = hr*60+m
ans = diff - k

if ans <=0:
	print(0)
else:
	print(ans)
Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
H1, M1, H2, M2, K = map(int, input().split())
if(H1 > H2): H2 += 24
T1 = H1 * 60 + M1
T2 = H2 * 60 - M2
T = T2 - T1
print(T - K)

Failing test case input:
1 -69 107 19 0

Expected output:
6448


Actual output:
6410


Fixed submission (verdict: Accepted):
H1, M1, H2, M2, K = map(int, input().split())
T1 = H1 * 60 + M1
T2 = H2 * 60 + M2
T = T2 - T1
print(T - K)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h1,m1,h2,m2,k = map(int,input().split())
t1 = h1*60+m1
t2 = h2*60+m1
d = t2-t1
print(d-k)

Failing test case input:
4 0 12 -1 22

Expected output:
457


Actual output:
458


Fixed submission (verdict: Accepted):
h1,m1,h2,m2,k = map(int,input().split())
t1 = h1*60+m1
t2 = h2*60+m2
d = t2-t1
print(d-k)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h1,m1,h2,m2,k = map(int,input().split())

dm = m2 - m1
if dm < 0:
    h2 -= 1
    dm = 60 - dm
dh= h2 - h1
print(dh*60 + dm - k)

Failing test case input:
11 0 12 -1 29

Expected output:
30


Actual output:
32


Fixed submission (verdict: Accepted):
h1,m1,h2,m2,k = map(int,input().split())

dm = m2 - m1
if h2 < h1:
    h2 +=24

if dm < 0:
    h2 -= 1
    dm = 60 + dm

print((h2 - h1)*60 + dm - k)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
H1, M1, H2, M2, K = map(int, input().split())

time = 60*H2+M2 - 60*H1+M1

print(max(time-K, 0))


Failing test case input:
31 -1 620 6 -1

Expected output:
35348


Actual output:
35346


Fixed submission (verdict: Accepted):
H1, M1, H2, M2, K = map(int, input().split())

time = (60*H2+M2) - (60*H1+M1)

print(max(time-K, 0))

Problem: p02663
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
h1, m1, h2, m2, k = list(map(int, input().split()))
if m1 < m2:
    h1 -= m2/60
    m1 += m2/60
tm = m1 - m2
th = h2 - h1
if k > (th*60 + tm):
    print (0)
else:
    print(th*60 + tm - k)

Failing test case input:
16 -1 337 3 0

Expected output:
19264


Actual output:
19259.05


Fixed submission (verdict: Accepted):
h1, m1, h2, m2, k = list(map(int, input().split()))
if m2 < m1:
    while m2 < m1:
        h2 -= 1
        m2 += 60
tm = m2 - m1
th = h2 - h1
if k > (th*60 + tm):
    print (0)
else:
    print(th*60 + tm - k)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b,c,d,e = map(int,input().split())

f = c - a
g = d - b
if g < 0:
  g = -g
  f -=1
total = 60 * f + g
if total - e <= 0:
  print('0')
else:
    total -= e 
    print(total)

Failing test case input:
4 0 12 -1 22

Expected output:
457


Actual output:
399


Fixed submission (verdict: Accepted):
a,b,c,d,e = map(int,input().split())

f = c - a
g = d - b
if g < 0:
  g = 60 + g
  f -=1
total = 60 * f + g
if total - e <= 0:
  print('0')
else:
    total -= e 
    print(total)
Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h1,m1,h2,m2,k = map(int,input().split())

dm = m2 - m1
if h2 < h1:
    h2 +=24

if dm < 0:
    h2 -= 1
    dm = 60 - dm

print((h2 - h1)*60 + dm - k)

Failing test case input:
4 0 12 -1 22

Expected output:
457


Actual output:
459


Fixed submission (verdict: Accepted):
h1,m1,h2,m2,k = map(int,input().split())

dm = m2 - m1
if h2 < h1:
    h2 +=24

if dm < 0:
    h2 -= 1
    dm = 60 + dm

print((h2 - h1)*60 + dm - k)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
H1, M1, H2, M2, K = map(int, input().split())

ans = (H2 * 60 + M2 - H1 * 60 + M1) - K
print(ans)

Failing test case input:
1 -41 83 33 0

Expected output:
4994


Actual output:
4912


Fixed submission (verdict: Accepted):
H1, M1, H2, M2, K = map(int, input().split())
 
ans = (H2 * 60 + M2) - (H1 * 60 + M1) - K
print(ans)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
(a,b,c,d,e)=map(int,input().split())

if a==c:
    t=d-b
    if e<=t:
        print(t-e)
    else:
        print(0)
    
if c>a:
    if b>d:
        t=60-b+d
        if e<=t:
            print(t-e)
        else:
            print(0)
        
        
    if b<=d:
        t=(c-a)*60+d-b
        if e<=t:
            print(t-e)
        else:
            print(0)

Failing test case input:
8 0 12 -1 34

Expected output:
205


Actual output:
25


Fixed submission (verdict: Accepted):
(a,b,c,d,e)=map(int,input().split())

if a==c:
    t=d-b
    if e<=t:
        print(t-e)
    else:
        print(0)
    
if c>a:
    if b>d:
        t=60*(c-a)-b+d
        if e<=t:
            print(t-e)
        else:
            print(0)
        
        
    if b<=d:
        t=(c-a)*60+d-b
        if e<=t:
            print(t-e)
        else:
            print(0)

Problem: p02663
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
h1, m1,h2,m2,k = map(int,input().split())
print(abs((h2*60+m2 - h1*60+m1)-k))

Failing test case input:
1 -13 83 26 -1

Expected output:
4960


Actual output:
4934


Fixed submission (verdict: Accepted):
h1, m1,h2,m2,k = map(int,input().split())
print(((h2*60+m2) - (h1*60+m1))-k)

Problem: p02663
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n = list(map(int,input().split()))

start = n[0]*60 + n[1]
end = n[2]*60 + n[3]

zikan = end - start -1
kai = zikan 
print(kai)


Failing test case input:
1 -69 107 19 0

Expected output:
6448


Actual output:
6447


Fixed submission (verdict: Accepted):
n = list(map(int,input().split()))

start = n[0]*60 + n[1]
end = n[2]*60 + n[3]

zikan = (end - start) - n[4]
print(zikan)
Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
H = list(map(int,input().split()))

h = H[2]-H[0]
m = H[3]-H[1]

if h < 0:
    h = h + 24

if m < 0:
    h -= 1
    m *= -1

mini = h*60 + m - H[4]

if mini < 0:
    mini = 0

print(mini)

Failing test case input:
4 0 12 -1 22

Expected output:
457


Actual output:
399


Fixed submission (verdict: Accepted):
H = list(map(int,input().split()))

h = H[2]-H[0]
m = H[3]-H[1]

if h < 0:
    h = h + 24

if m < 0:
    h -= 1
    m = 60 + m

mini = h*60 + m - H[4]

if mini < 0:
    mini = 24*60 + mini

print(mini)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
(a,b,c,d,e)=map(int,input().split())

if a==c:
    t=d-b
    if e<=t:
        print(t-e)
    else:
        print(0)
    
if c>a:
    if b>d:
        t=60-b+d
        if e<=t:
            print(t-e)
        else:
            print(0)
        
        
    if b<=d:
        t=(c-a)*60+d-b
        if e<=t:
            print(t-e)
        else:
            print(0)
        



Failing test case input:
8 0 12 -1 22

Expected output:
217


Actual output:
37


Fixed submission (verdict: Accepted):
(a,b,c,d,e)=map(int,input().split())

if a==c:
    t=d-b
    if e<=t:
        print(t-e)
    else:
        print(0)
    
if c>a:
    if b>d:
        t=60*(c-a)-b+d
        if e<=t:
            print(t-e)
        else:
            print(0)
        
        
    if b<=d:
        t=(c-a)*60+d-b
        if e<=t:
            print(t-e)
        else:
            print(0)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
num_list = list(map(int, input().split())) 

a=num_list[2]-num_list[0]
b=num_list[3]-num_list[1]
if b>0:
    a=a-1
a=a*60
c=b+a-num_list[4]
if c<0:
    c=0
print(c)

Failing test case input:
17 -4 435 10 -1

Expected output:
25095


Actual output:
25035


Fixed submission (verdict: Accepted):


num_list = list(map(int, input().split())) 

a=num_list[2]-num_list[0]
b=num_list[3]-num_list[1]
if b<0:
    a=a-1
    b=b+60
a=a*60
c=b+a-num_list[4]
if c<0:
    c=0
print(c)

Problem: p02663
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n = list(map(int,input().split()))

start = n[0]*60 + n[1]
end = n[2]*60 + n[3]

zikan = end - start -2
kai = zikan 
print(kai)


Failing test case input:
-1 -13 83 14 0

Expected output:
5067


Actual output:
5065


Fixed submission (verdict: Accepted):
n = list(map(int,input().split()))

start = n[0]*60 + n[1]
end = n[2]*60 + n[3]

zikan = (end - start) - n[4]
print(zikan)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
H1, M1, H2, M2, K = map(int, input().split())

ans = 60 * H2 + M2 - 60 * H1 + M1 - K
print(ans)



Failing test case input:
2 -13 83 26 -1

Expected output:
4900


Actual output:
4874


Fixed submission (verdict: Accepted):
H1, M1, H2, M2, K = map(int, input().split())

ans = 60 * (H2 - H1) + M2 - M1 - K
print(ans)
Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def solve():
    H1, M1, H2, M2, K = map(int, input().split())
    print((H2*60 + M2) - (H1*60 + M2) - K)

if __name__ == '__main__':
    solve()


Failing test case input:
6 -1 51 1 1

Expected output:
2701


Actual output:
2699


Fixed submission (verdict: Accepted):
def solve():
    H1, M1, H2, M2, K = map(int, input().split())
    print((H2*60 + M2) - (H1*60 + M1) - K)

if __name__ == '__main__':
    solve()

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h1, m1, h2, m2, k = map(int,input().split())

if m1 < m2:
    m1 += 60
    h1 -=1
    ans_m = m1 - m2
else:
    ans_m = m1 - m2

ans_h = h2 - h1
ans = 60 * ans_h + ans_m

print(ans-k)

Failing test case input:
6 -1 51 1 1

Expected output:
2701


Actual output:
2817


Fixed submission (verdict: Accepted):
h1, m1, h2, m2, k = map(int,input().split())

if m1 > m2:
    m2 += 60
    h2 -=1
    ans_m = m2 - m1
else:
    ans_m = m2 - m1

ans_h = h2 - h1
ans = 60 * ans_h + ans_m

print(ans-k)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h1, m1, h2, m2, k = map(int, input().split())
pos = 60 * (h2 - h1) + abs(m2 - m1)
print(max(0, pos - k))


Failing test case input:
11 0 12 -1 29

Expected output:
30


Actual output:
32


Fixed submission (verdict: Accepted):
h1, m1, h2, m2, k = map(int, input().split())
pos = 60 * (h2 - h1 - 1) + (60 - m1) + m2
print(pos - k)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
H1,M1,H2,M2,K=map(int, input().split())
if H1 == 0:
  H1 = 24
if H2 == 0:
  H2 = 24
hour = H2-H1
if M1 > M2:
  hour -=1
  minutes = abs(M2-M1)
else:
  minutes = M2-M1

print(hour*60+minutes-K)


Failing test case input:
0 -8 722 6 -1

Expected output:
43335


Actual output:
41895


Fixed submission (verdict: Accepted):
H1,M1,H2,M2,K=map(int, input().split())

if H1 > H2:
  hour = H2+(24-H1)
else:
  hour = H2-H1

if M1 > M2:
  hour -= 1
  minutes = M2+(60-M1)
else:
  minutes = M2-M1
print(hour*60+minutes-K)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):






def çözmek():
    h, m, H, M, K = map(int, input().split(" "))
    res = (H * 60) + M - K - (h * 60) + m
    print(res)
if __name__ == "__main__":
    çözmek()


Failing test case input:
17 -4 435 6 -1

Expected output:
25091


Actual output:
25083


Fixed submission (verdict: Accepted):






def çözmek():
    h, m, H, M, K = map(int, input().split(" "))
    if H != 0:
        H = H * 60
    if h != 0:
        h = h * 60
    res = H + M - K - h - m
    print(res)
if __name__ == "__main__":
    çözmek()

Problem: p02663
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
h,m,H,M,k = map(int,input().split())
v = H*60+M
u = h*60+M
print(max(v-k-u,0))

Failing test case input:
1 -7 28 1 0

Expected output:
1628


Actual output:
1620


Fixed submission (verdict: Accepted):
h,m,H,M,k = map(int,input().split())
v = H*60+M
u = h*60+m+k
print(v-u)
Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
li = list(map(int,input().split()))
h1, m1, h2, m2, k = li
life_time = (h2 - h1)*60 + (m2 - m1)
time = life_time - k 


Failing test case input:
0 -11 903 6 0

Expected output:
54197


Actual output:

Fixed submission (verdict: Accepted):
li = list(map(int,input().split()))
h1, m1, h2, m2, k = li
life_time = (h2 - h1)*60 + (m2 - m1)
time = life_time - k 
print(time)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h1, m1, h2, m2, k = list(map(int, input().split()))

wake = (h2 * 60 + m2) - (h1 * 60 + m1)

if ((wake - k) >= k):
    ans = wake
else:
    ans = 0

print(ans)


Failing test case input:
-1 -5 68 14 -1

Expected output:
4160


Actual output:
4159


Fixed submission (verdict: Accepted):
h1, m1, h2, m2, k = list(map(int, input().split()))

wake = (h2 * 60 + m2) - (h1 * 60 + m1)

if (wake > k):
    ans = wake - k
else:
    ans = 0

print(ans)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h,m,h2,m2,k=map(int,input().split())
print(h2*60+m2-h*60+m-k)

Failing test case input:
6 -1 16 1 0

Expected output:
602


Actual output:
600


Fixed submission (verdict: Accepted):
h,m,h2,m2,k=map(int,input().split())
print(max((h2*60+m2)-(h*60+m)-k,0))

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
H1, M1, H2, M2, K = [ int(i) for i in input().strip().split(' ')]
print(H2 * 60 + M2 - (H1 * 60 + M2) - K)

Failing test case input:
-1 -3 436 6 -1

Expected output:
26230


Actual output:
26221


Fixed submission (verdict: Accepted):
H1, M1, H2, M2, K = [ int(i) for i in input().strip().split(' ')]
print(H2 * 60 + M2 - (H1 * 60 + M1) - K)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
H1, M1, H2, M2, K = map(int,input().split())

latest = H2*60+M2-K  
earliest = H1*60

study = latest-earliest
print(study)

Failing test case input:
-1 -9 68 14 -2

Expected output:
4165


Actual output:
4156


Fixed submission (verdict: Accepted):
H1, M1, H2, M2, K = map(int,input().split())

latest = H2*60+M2-K  
earliest = H1*60+M1
study = latest-earliest
print(study)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
H1,M1,H2,M2,K = list(map(int,input().split()))


minutes = H2*60-H1*60+M1-M2 -K
print(minutes)

Failing test case input:
0 -11 903 6 0

Expected output:
54197


Actual output:
54163


Fixed submission (verdict: Accepted):
H1,M1,H2,M2,K = list(map(int,input().split()))
 
 
minutes = H2*60+M2 -H1*60-M1 -K
print(minutes)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h1, m1, h2, m2, k = map(int, input().split())

h1h2 = (h2-h1)*60
m1m2 = abs(m1-m2)

print(h1h2-m1m2-k)

Failing test case input:
-1 -9 65 14 -2

Expected output:
3985


Actual output:
3939


Fixed submission (verdict: Accepted):
h1, m1, h2, m2, k = map(int, input().split())
hm = ((h2-h1)*60)-(m1-m2)-k
print(hm)
Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from math import *
from sys import stdin,stdout
input=stdin.buffer.readline

ip=[int(x) for x in input().split()]
h1=ip[0]
m1=ip[1]
h2=ip[2]
m2=ip[3]
k=ip[4]

time=(h2*60+m2-1)-(h1*60+m1+1)
x=time
if(k*x<0):
	print(0)
else:
	print(k*x)

Failing test case input:
10 -1 104 6 -1

Expected output:
5648


Actual output:
0


Fixed submission (verdict: Accepted):
from math import *
from sys import stdin,stdout
input=stdin.buffer.readline

ip=[int(x) for x in input().split()]
h1=ip[0]
m1=ip[1]
h2=ip[2]
m2=ip[3]
k=ip[4]

time=(h2*60+m2)-(h1*60+m1)-k
print(time)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
H1, M1, H2, M2, K = map(int, input().split())

H = (H2 - H1) * 60
M = M2 - M1

res = (H+M) - 30

if res > K:
    print((H+M) - 30)
else:
    print(0)

Failing test case input:
1 -7 28 1 1

Expected output:
1627


Actual output:
1598


Fixed submission (verdict: Accepted):
H1, M1, H2, M2, K = map(int, input().split())

H = (H2 - H1) * 60
M = M2 - M1

res = (H+M)

if res >= K:
    print(res - K)
else:
    print(0)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
H1,M1,H2,M2,K = map(int,input().split())
K_time = (H2*60+M2) - (H1*60-M1)
print(K_time - K)

Failing test case input:
1 -26 83 26 -1

Expected output:
4973


Actual output:
4921


Fixed submission (verdict: Accepted):
H1,M1,H2,M2,K = map(int,input().split())
K_time = (H2*60+M2) - (H1*60+M1)
print(K_time - K)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h1, m1, h2, m2, K = list(map(int, input().split()))
if abs(h1-h2)*60 + abs(m1-m2) <= 120:
    print('{}'.format(0))
else:
    print('{}'.format(abs(h1-h2)*60 + abs(m1-m2) - K))

Failing test case input:
11 -1 12 -1 29

Expected output:
31


Actual output:
0


Fixed submission (verdict: Accepted):
h1, m1, h2, m2, K = list(map(int, input().split()))
if (h2 - h1)*60 + (m2-m1) < K:
    print('{}'.format(0))
else:
    print('{}'.format((h2 - h1)*60 + (m2-m1) - K))

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
A, B, C ,D, K = map(int,input().split())

ans = (C-A)* 60 + B - D - K

print(ans)

Failing test case input:
1 -41 83 51 0

Expected output:
5012


Actual output:
4828


Fixed submission (verdict: Accepted):
A, B, C ,D, K = map(int,input().split())

ans = (C-A)* 60 - B + D - K

print(ans)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

 
H1, M1, H2, M2, K = [int(i) for i in input().split(" ")]
 
awake_time = H1 *60 + M1
sleep_time = H2 *60 + M1
start_limit_time = sleep_time - K
can_study_time = start_limit_time - awake_time
 
print(can_study_time)


Failing test case input:
6 -1 80 1 0

Expected output:
4442


Actual output:
4440


Fixed submission (verdict: Accepted):
import sys


 
H1, M1, H2, M2, K = map(int, sys.stdin.read().split())
 
awake_time = H1 *60 + M1
sleep_time = H2 *60 + M2
start_limit_time = sleep_time - K
can_study_time = start_limit_time - awake_time
 
print(can_study_time)
Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
H1,M1,H2,M2,K = map(int,input().split())
  
print(60 * (H1 - H2) + M2 - M1 - K)

Failing test case input:
0 -11 1486 6 0

Expected output:
89177


Actual output:
-89143


Fixed submission (verdict: Accepted):
H1,M1,H2,M2,K = map(int,input().split())

print(60 * (H2 - H1) + M2 - M1 - K)

Problem: p02663
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
FH, FM, TH, TM, K = map(int, input().split())
M = (TH*60+TM)-(FH*60+FM)
ans = M 
print(ans*K)


Failing test case input:
0 -11 1486 6 0

Expected output:
89177


Actual output:
0


Fixed submission (verdict: Accepted):
FH, FM, TH, TM, K = map(int, input().split())
M = (TH*60+TM)-(FH*60+FM)
print(M-K)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h1,m1,h2,m2,k = map(int,input().split())

d=h2*60+m2-h1*60+m1-k
print(d)

Failing test case input:
2 -26 83 26 -1

Expected output:
4913


Actual output:
4861


Fixed submission (verdict: Accepted):
h1,m1,h2,m2,k = map(int,input().split())

d=(h2*60+m2)-(h1*60+m1)-k
print(d)

Problem: p02663
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
h, m, H, M, K = map(int, input().split())

if M >= m :
    k = (H - h) * 60
    k += M - m
    
else :
    k = (h - h - 1) * 60
    k += 60 - m
    k += M
    
if k - K <= 0 :
    print(0)
else :
    print(k - K)

Failing test case input:
4 0 12 -1 22

Expected output:
457


Actual output:
0


Fixed submission (verdict: Accepted):
h, m, H, M, K = map(int, input().split())

if M >= m :
    k = (H - h) * 60
    k += M - m
    
else :
    k = (H - h - 1) * 60
    k += 60 - m
    k += M
    
if k - K <= 0 :
    print(0)
else :
    print(k - K)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h1, m1, h2, m2, k = map(int, input().split())
t1 = h1 * 60 + m1
t2 = h2 * 60 + m1


Failing test case input:
31 -1 620 3 -1

Expected output:
35345


Actual output:

Fixed submission (verdict: Accepted):
h1, m1, h2, m2, k = map(int, input().split())
t1 = h1 * 60 + m1
t2 = h2 * 60 + m2

print(t2-t1 - k)

Problem: p02663
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
import sys

H1,M1,H2,M2,K = map(int, sys.stdin.readline().split())

print((H2 - H1) * 60 + M1 - M2 - K)


Failing test case input:
-1 -3 436 11 -1

Expected output:
26235


Actual output:
26207


Fixed submission (verdict: Accepted):
import sys

H1,M1,H2,M2,K = map(int, sys.stdin.readline().split())

print((H2 - H1) * 60 + M2 - M1 - K)

Problem: p02663
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h1,m1,h2,m2,k = map(int,input().split())
if h2 < h1:
    h2 += 12
if m2 < m1:
	m2 += 60
if m2 < m1:
    h2 -= 1
m = m2-m1
h = h2-h1
print(60*h+m-k)


Failing test case input:
11 0 12 -1 29

Expected output:
30


Actual output:
90


Fixed submission (verdict: Accepted):
h1,m1,h2,m2,k = map(int,input().split())
if h2 < h1:
    h2 += 24
if m2 < m1:
    m2 += 60
    h2 -= 1
print((h2-h1)*60+m2-m1-k)