[Python] 백준 2884번 알람 시계
업데이트:
백준 2884번
H, M = map(int,input().split())
if M-45<0 and H>0:
M = M+15
H = H-1
elif M-45<0 and H==0:
H = 23
M = M+15
else:
M = M-45
print(H,M)
업데이트:
H, M = map(int,input().split())
if M-45<0 and H>0:
M = M+15
H = H-1
elif M-45<0 and H==0:
H = 23
M = M+15
else:
M = M-45
print(H,M)
댓글남기기