Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # часове и минути
- # превърнем само в минути
- # добавим 15
- # превърнем в часове и минути
- # печатаме
- now_hour = int(input())
- now_minutes = int(input())
- now_in_minutes = now_hour * 60 + now_minutes # 1439
- time_after_15_minutes = now_in_minutes + 15 # 1454
- final_hour = time_after_15_minutes // 60 # 24
- final_minutes = time_after_15_minutes % 60
- if final_hour == 24:
- final_hour = 0
- if final_minutes < 10:
- print(f'{final_hour}:0{final_minutes}')
- else:
- print(f'{final_hour}:{final_minutes}')
Add Comment
Please, Sign In to add comment