#13317. [NWRRC 2014] Alarm Clock

[NWRRC 2014] Alarm Clock

[NWRRC 2014] Alarm Clock

题目描述

Alice likes her digital alarm clock. She sets them up every evening. Last night Alice had a dream about her clock. Unfortunately, the only thing she is able to remember is the number of highlighted segments of the clock. Alice wonders what time was set on the clock in her dream.

Alice's clock have four digits: two for hours and two for minutes. For example, the clock below shows 9:309:30 (note the leading zero).

The clock uses following digit representation.

输入格式

The only line of the input file contains single integer $n$ — the number of highlighted segments of the clock in Alice's dream $(0 \le n \le 30)$ .

输出格式

Output five characters in $\text{hh:mm}$ format — the time shown on the clock in Alice's dream. The time must be correct: $0 \le \text{hh} < 24$ and $0 \le \text{mm}
23
09:30
28
Impossible
2
Impossible

提示

Time limit: 2 s, Memory limit: 256 MB.

spj provider:

user/237530
|Special Judge|ICPC|NWRRC

来源

P7060|[NWRRC 2014] Alarm Clock