With the popularity of entertainment games such as happy farm on the Internet, the "food stealing" Network instantly swept the lives of netizens. So, "are you stealing?" becomes a greeting for everyone. Soon, millions of urban white-collar workers became the main force in the "food stealing" team. Every day, they enjoyed the "Stealing" and "Stealing", and even set an alarm to get up in the middle of the night to "steal" food. Develop food stealing schedules based on the growth patterns of crops.
Input
Assume that the current time is, the number of crop types N is input in the first line, and the time required for maturity of n crop types starting from the second line, in the format of hour: Minute.
Output
Output the maturity time of N crops in sequence, and output
Sample Input
30:301:1012:50
Sample output
13:4514:252:5
#include<stdio.h> int main() { int hour[100],minute[100],nhour[100],nminute[100],n,i; scanf("%d",&n); if(n < 1) return 0; for(i = 0;i < n;i ++) scanf("%d:%d",&hour[i],&minute[i]); for(i = 0;i < n;i ++) { nhour[i] = 13 + hour[i]; nminute[i] = 15 + minute[i]; if(nminute[i] > 59) { nminute[i] = nminute[i] - 60; nhour[i] ++; } if(nhour[i] > 23) nhour[i] = nhour[i] - 24; printf("%d:%d\n",nhour[i],nminute[i]); } return 0; }
Food stealing schedule