영어 원문입니다. 원문의 수식·표를 글자로 옮겨 모양이 다를 수 있습니다. 정확한 내용은 원문 페이지에서 확인하세요. 원문 페이지 열기 (새 창)
Problem
When someone asks you what time it is, most people respond “a quarter past five”, 15:29 or something similar. If you want to make things a bit harder, you can answer with the angle from the minute hand to the hour hand, since this uniquely determines the time. However, most people are not used to this way of specifying the time, so it would be nice to have a program which translates this to a more common format. Your task is to write such a program.
(그림은 원문 저장소에서 볼 수 있습니다)
Figure 1: The time on the left is 01:21. On the right, it is 03:08.
We assume that our clock has no second hand, and only displays the time at whole minutes (i.e., both hands only move forward once a minute). The angle is determined by starting at the hour hand and measuring the number of degrees clockwise to the minute hand. To avoid decimals, this angle is specified in tenths of a degree (so that 85.5 degrees is written as 855). This number is always an integer between 0 and 3595 (inclusive) and is, as a consequence of only measuring whole minutes, evenly divisible by 5.
Input
The input consists of a single integer between 0 and 3595 – the angle between the two hands, in tenths of a degree.
Output
Output the time that the angle corresponds to, in the format hh:mm. We assume that it's morning, so all times should be between 00:00 and 11:59.
Scoring
Your solution will be tested on three cases. The first two give you 33 points each, while the last gives you 34.
예제
예제 1
855
01:21
예제 2
3140
03:08