desislava_topuzakova

01. Sum Seconds

Apr 11th, 2021
517
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # 1. времената на тримата
  2. # 2. общо време (секунди) = време1 + време2 + време3
  3. # 3. общо време в секунди => минути и секунди
  4. # 4. печатаме -> проверка за секундите
  5.  
  6. time_first = int(input())
  7. time_second = int(input())
  8. time_third = int(input())
  9.  
  10. total_time = time_first + time_second + time_third
  11.  
  12. minutes = total_time // 60
  13. seconds = total_time % 60
  14.  
  15. if seconds < 10:
  16.     print(f"{minutes}:0{seconds}")
  17. else:
  18.     print(f"{minutes}:{seconds}")
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×