[IT]/백준
[백준] 2525번 오븐 시계
working_hard
2019. 9. 21. 00:04
728x90
내가 푼 풀이
import sys
sys.stdin = open("1.txt")
h,m = map(int,input().split())
time = int(input())
if m+time>=60:
hour_add = (m+time)//60
m = (m+time)%60
h = (h+hour_add)%24
else:
m = m+time
print(h,m)
고수의 풀이
hr, mn = tuple(map(int, input().split(" ")))
mn += int(input())
hr += mn//60
mn %= 60
hr %= 24
print(hr, mn)