#981
Bronze IV
SPAVANAC
시간 제한
1s
메모리 제한
32MB
제출
2
정답
2
맞힌 사람
1
정답 비율
100.0%

문제

Every school morning Mirko is woken up by the sound of his alarm clock. Since he is a bit forgetful, quite often he leaves the alarm on on Saturday morning too. That's not too bad tough, since he feels good when he realizes he doesn't have to get up from his warm and cozy bed. He likes that so much, that he would like to experience that on other days of the week too! His friend Slavko offered this simple solution: set his alarm clock 45 minutes early, and he can enjoy the comfort of his bed, fully awake, for 45 minutes each day. Mirko decided to heed his advice, however his alarm clock uses 24-hour notation and he has issues with adjusting the time. Help Mirko and write a program that will take one time stamp, in 24-hour notation, and print out a new time stamp, 45 minutes earlier, also in 24-hour notation. Note: if you are unfamiliar with 24-hour time notation yourself, you might be interested to know it starts with 0:00 (midnight) and ends with 23:59 (one minute before midnight).

입력

The first and only line of input will contain exactly two integers H and M (0 ≤ H ≤23, 0 ≤M ≤59) separated by a single space, the input time in 24-hour notation. H denotes hours and M minutes.

출력

The first and only line of output should contain exactly two integers, the time 45 minutes before input time.

예제 입력 1

10 10

예제 출력 1

9 25

예제 입력 2

0 30

예제 출력 2

23 45

예제 입력 3

23 40

예제 출력 3

22 55
코드 제출

코드를 제출하려면 로그인이 필요합니다.

로그인
내 제출
제출 내역이 없습니다.
맞은 사람
#순위사용자언어시간메모리코드 길이
5713🥇
조서현
Python8ms8288KB83B
난이도 투표
Bronze IV1명 투표· 약 1개월 전
로그인 후 AC 받으면 투표할 수 있습니다.
전체 제출
#사용자문제결과언어시간메모리코드 길이제출 시간
5942
맞았습니다
PyPy21ms50648KB83B2026. 05. 04. 08:27
5713
맞았습니다 (30점)
Python8ms8288KB83B2026. 04. 30. 05:46