Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 1. Read input (seconds)
- first_time = int(input())
- second_time = int(input())
- third_time = int(input())
- # 2. Sum input
- sum_seconds = first_time + second_time + third_time
- minutes = sum_seconds // 60
- seconds = sum_seconds % 60
- # 4. Check if seconds < 10 -> leading zero
- # a: print minutes + :0 + seconds
- # b: print minutes + :second
- if seconds < 10:
- print(str(minutes) + ':0' + str(seconds))
- else:
- print(str(minutes) + ':' + str(seconds))
Add Comment
Please, Sign In to add comment