l1-018. Big Ben time limit MS memory limit 65536 KB code length limit 8000 B procedure StandardAuthor Chen
Weibo has a self-proclaimed "Big Ben V" Guy, every day to call the clock urged yards farmers love their bodies to sleep early. However, because the clock's own routine is not very regular, so the bell is not timed. The average number of bells is based on the time of the bell, if just on a certain hour, then "when" the number is equal to the whole hour, if the whole point, hit the next hour number. In addition, although there are 24 hours a day, the clock is only in the rear half-day knock 1~12 under. For example, ringing a bell at 23:00 is "when to be a" when being as a ", and to 23:01 will be" when when as when as when as when as when. " The clock is not knocked at midnight 00:00 to 12:00 noon (end time included).
Please write a program below, according to the current time for Big Ben Bell.
Input format:
Enter the first line to give the current time in the format "hh:mm". Where HH is the hour, between 00 and 23, MM is the minute, between 00 and 59.
Output format:
According to the current time for Big Ben Bell, that is, in a row output the corresponding number of "Dang". If the clock is not ringing, the output:
Only hh:mm. Too early to Dang.
where "hh:mm" is the input time.
Input Sample 1:
19:05
Output Example 1:
Dangdangdangdangdangdangdangdang
Input Sample 2:
07:05
Output Example 2:
Only 07:05. Too early to Dang.
1#include <stdio.h>2#include <string.h>3 intMain () {4 inth,m;5scanf"%d:%d",&h,&m);6 if((h== A&&m>0)|| (h> A&&h< -)) {7h-= A;8 inti;9 if(m>0)Tenh+=1; One for(i=0; i) Aprintf"Dang"); -printf"\ n"); - } the Else if(h== -) -H=0; - Else -printf"Only %02d:%02d. Too early to dang.\n", h,m); + return 0; -}
l1-018. Big Ben