H, M = map(int,input().split())
early = 45
if H < 0 or H > 23 or M > 60 or M < 0:
print('wrong input')
else:
change_time = M - early
while change_time > 0:
print(int(H),int(change_time))
while change_time < 0 and H != 0 :
H -=1
change_time += 60
print(int(H),int(change_time))
while change_time < 0 and H == 0:
H +=23
change_time +=60
print(int(H),int(change_time))
jus981014 3년 전
터미널 상에서는 정상 출력됩니다.