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)

cinador   2년 전

반례드립니다.

wjdghlwns02   2년 전

감사합니다. 해결됬습니다!!

댓글을 작성하려면 로그인해야 합니다.