-->
当前位置:首页 > 题库 > 正文内容

编程题:Big Ben

Luz2年前 (2022-12-12)题库1891
There is a lovely big Ben. It rings the bell every day to make everyone pay attention to the time to rest. However, because Ben Zhong doesn't work and rest regularly, he doesn't ring the bell regularly.
Generally, the number of times to ring the bell is determined according to the time. At the hour, the number of "Dang" that rings the bell is equal to the number of hours; If it is past the hour, ring the bell one more "dang".
In addition, although there are 24 hours in a day, Big Ben only rings the bell in the second half of the day.
For example, The sound of the 23:00 bell is "DangDangDangDangDangDangDangDangDangDangDang". At 23:01, it will be "DangDangDangDangDangDangDangDangDangDangDangDang".
From 00:00 at midnight to 12:00 at noon (including the starting and ending time), Big Ben does not ring.

### Input Specification:
Enter the current time in the format of "hh:mm", where hh is an hour between 00 and 23, and mm is a minute between 00 and 59.

### Output Specification:

Ring the bell for Big Ben according to the current time, that is, output the corresponding number of Dangs in a line. If it is in the period when the bell does not ring, output: Only hh:mm. Too early to Dang.

### Sample Input #1:
in
15:00


### Sample Output #1:

Write the corresponding sample output here. For example:

out
DangDangDang

### Sample Input #2:
in
12:16

### Sample Output #2:

Write the corresponding sample output here. For example:

out
Dang

### Sample Input #3:
in
09:30

### Sample Output #3:

Write the corresponding sample output here. For example:

out
Only 09:30. Too early to Dang.













答案:若无答案欢迎评论

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。