DerioFT

1061.py

Dec 6th, 2021
646
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. second = second2 - second1
  10. minute = minute2 - minute1
  11. hour = hour2 - hour1
  12. day = day2 - day1
  13.  
  14. if (second < 0):
  15.     second += 60
  16.     minute -= 1
  17.  
  18. if (minute < 0):
  19.     minute += 60
  20.     hour -= 1
  21.  
  22. if (hour < 0):
  23.     hour += 24
  24.     day -= 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