SHARE
TWEET

Untitled

a guest Feb 23rd, 2020 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. hour = int(input())
  2. minutes = int(input())
  3. new_minutes = minutes + 15
  4. if new_minutes < 60:
  5.     print(str(hour) + ':' + str(new_minutes))
  6.  
  7. elif new_minutes >= 60 and hour + 1 < 24:
  8.     hour = hour + 1
  9.     new_minutes = new_minutes - 60
  10.     print(str(hour) + ':' + str(format(new_minutes, '02d')))
  11.  
  12. elif new_minutes >= 60 and hour + 1 >= 24:
  13.     hour = 0
  14.     new_minutes = new_minutes - 60
  15.     print(str(hour) + ':' + str(format(new_minutes, '02d')))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top