cool hamsters never sleep

백준 2530. 인공지능 시계 본문

Python Algorithm

백준 2530. 인공지능 시계

슈슈 susu 2022. 9. 21. 11:37
a, b, c = map(int, input().split())
d = int(input())

x = d//3600
y = (d-(x*3600))//60
z = d%60

h = a+x
m = b+y
s = c+z

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

 

 

고전했습니다만

머리가 꽤나 똑똑해진 느낌이군요

'Python Algorithm' 카테고리의 다른 글

백준 10162. 전자레인지  (0) 2022.09.23
백준 4447. 좋은놈 나쁜놈  (0) 2022.09.22
백준 5355. 화성 수학  (0) 2022.09.20
백준 2476. 주사위 게임  (0) 2022.09.19
백준 10817. 세 수  (0) 2022.09.19
Comments