BAEKJOON/Python

[B2530][인공지능 시계][python]

sseni 2021. 3. 5. 16:36
728x90

https://www.acmicpc.net/problem/2530


a,b,c = map(int, input().split())
x = int(input())

a += (x // 60) // 60
b += (x // 60) % 60
c += x % 60

if c >= 60:
    c %= 60
    b += 1
if b >= 60:
    b %= 60
    a += 1
if a >= 24:
    a %= 24
    
print(a,b,c)
728x90