Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

uri beecrowd problem 1047 Game Time with Minutes

s_h, s_m, e_h, e_m = list(map(int, input().split()))
if e_h > s_h or (e_h == s_h and e_m > s_m):

    h_diff = e_h - s_h
else:
    h_diff = (e_h - s_h) + 24
    
if e_m < s_m:
    h_diff -= 1
    m_diff = (e_m - s_m) + 60
else:
    m_diff = e_m - s_m

print('O JOGO DUROU ',h_diff,' HORA(S) E ', m_diff,' MINUTO(S)', sep='',end='
')
 
PREVIOUS NEXT
Tagged: #uri #beecrowd #problem #Game #Time #Minutes
ADD COMMENT
Topic
Name
4+1 =