2525번 - 오븐 시계
어디가 틀렸을까요..?
h , m =map(int,input().split())
cookingTime= int(input())
if m+cookingTime <=60:
print(h,m+cookingTime)
elif m+cookingTime >60:
if h+(m+cookingTime)//60<=23:
print(h+(m+cookingTime)//60,(m+cookingTime)%60)
elif h+(m+cookingTime)//60>23:
print((h+(m+cookingTime)//60)-24,(m+cookingTime)%60)
반례드립니다.
감사합니다. 해결됬습니다!!
댓글을 작성하려면 로그인해야 합니다.
wjdghlwns02 2년 전
어디가 틀렸을까요..?
h , m =map(int,input().split())
cookingTime= int(input())
if m+cookingTime <=60:
print(h,m+cookingTime)
elif m+cookingTime >60:
if h+(m+cookingTime)//60<=23:
print(h+(m+cookingTime)//60,(m+cookingTime)%60)
elif h+(m+cookingTime)//60>23:
print((h+(m+cookingTime)//60)-24,(m+cookingTime)%60)