x,y=map(int,input().split())
i=int(input())
if y+i>=60:
print((x+((y+i)//60))%24,(y+i)%60)
elif y+i<60:
print(x,y+i)
'알고리즘 > 백준' 카테고리의 다른 글
백준-2557번(Hello World)-C (0) | 2023.11.24 |
---|---|
백준-2530번(인공지능 시계)-python3 (0) | 2023.11.24 |
백준-2480번(주사위 세개)-python3 (0) | 2023.11.24 |
백준-2476번(주사위 게임)-python3 (0) | 2023.11.24 |
백준-2468번(안전 영역) (0) | 2023.11.24 |