TOPIC

Wrong answer (100%)

Douglas Constant asked 4 years ago

h1 = 1 m1 = 1 h2 = 1 m2 = 1 while h1!=0 or m1!=0 or h2!=0 or m2!=0: n = input().split() h1 = int(n[0]) m1 = int(n[1]) h2 = int(n[2]) m2 = int(n[3]) if h1 == h2: if m1 > m2: m = (60 - m1) + m2 print((2360) + m) elif h2 > h1: if m1 == m2: m = 0 print((60(h2 - h1)) + m) elif m1 < m2: m = m2 - m1 print((60(h2 - h1)) + m) elif m1 > m2: m = (60 - m1) + m2 print((60(h2 - h1 - 1)) + m) elif h1 > h2: if m1 == m2: m = 0 print((60((24 - h1) + h2)) + m) elif m1 < m2: m = m2 - m1 print((60((24 - h1) + h2)) + m) elif m1 > m2: m = (60 - m1) + m2 print((60*((24 - h1) + h2 - 1)) + m)

This topic has not been answered yet. Be the first!

Remember not post solutions. Your post may be reviewed by our moderators.