DerioFT

1061.py

Sep 21st, 2021
761
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. dia, day1 = input().split()
  2. day1 = int(day1)
  3. hour1, minute1, second1=map(int,input().split(":"))
  4.  
  5. dia,day2 = input().split()
  6. day2 = int(day2)
  7. hour2,minute2,second2 = map(int,input().split(":"))
  8.  
  9. day = day2 - day1
  10. hour = hour2 - hour1
  11. minute = minute2 - minute1
  12. second = second2 - second1
  13.  
  14. if(hour < 0):
  15.     hour += 24
  16.     day -= 1
  17.  
  18. if(minute < 0):
  19.     minute+=60
  20.     hour -= 1
  21.  
  22. if(second < 0):
  23.     second += 60
  24.     minute -= 1
  25.  
  26. print(day,"dia(s)")
  27. print(hour,"hora(s)")
  28. print(minute,"minuto(s)")
  29. print(second,"segundo(s)")
RAW Paste Data