본문 바로가기
Algorithm/Implementaion

[백준] 2530번 인공지능 시계

by 등촌동 꼬북이 2020. 10. 20.

엄청난 양의 초가 입력될 수 있음을 고려하고 풀어야됨..

 

h, m, s = map(int, input().split())
second = int(input())

s += second
if s >= 60:
    m += s // 60
    s = s % 60
    if m >= 60:
        h += m // 60
        m = m % 60
        if h >= 24:
            h = h % 24
print(h, m, s)

'Algorithm > Implementaion' 카테고리의 다른 글

[백준] 2480번 주사위 세개  (0) 2020.10.20
[백준] 2935번 소음  (0) 2020.10.20
[백준] 2476번 주사위 게임  (0) 2020.10.20
[백준] 4101번 크냐?  (0) 2020.10.20
[백준] 2525번 오븐 시계  (0) 2020.10.20

댓글