VergeoPaw

1047

Sep 19th, 2021
803
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. H1,M1,H2,M2 = input().split()
  2. H1 = int(H1)
  3. M1 = int(M1)
  4. H2 = int(H2)
  5. M2 = int(M2)
  6.  
  7. TM11 = H1*60 + M1
  8. TM21 = H2*60 + M2
  9.  
  10. if TM11 > TM21 :
  11.     TM1 = TM11
  12.     TM2 = TM21 + 1440
  13. else :
  14.     TM1 = TM11
  15.     TM2 = TM21
  16. Tminutes = TM2 - TM1
  17. Hours = int((Tminutes - Tminutes%60)/60)
  18. Minutes = int(Tminutes%60)
  19.  
  20. if TM1 == TM2 :
  21.     print("O JOGO DUROU 24 HORA(S) E 0 MINUTO(S)")
  22. else :
  23.     print(f"O JOGO DUROU {Hours} HORA(S) E {Minutes} MINUTO(S)")
RAW Paste Data