Title: http://acm.gdufe.edu.cn/Problem/read/id/1087
Phillip Day Time limit:2000/1000ms (java/others) problem Description:
Hui-hui, Shanshan and Jia Jia are good friends, they joined in Changsha County, Hunan Province, held the 21st annual National Youth Informatics Olympiad (NOI2004). They came to Changsha very early, but the registration has not yet begun. What do we do? They decided to go out for a day and go back to the dorm in the evening to tell everyone what they have done for the day. You can't imagine what Phillip was doing--he slept all day. He thought: "A few days before the game is always written procedures to late at night, dizzy dizzy ... It's okay, have a good sleep, and then I'll be refreshed. After waking up, I'm going to do something meaningful. "This is a very good sleep, Hui Hui from the morning a point B minutes c seconds have slept to the afternoon D point e minute f seconds. How many seconds did he sleep?
Input:
The input contains multiple sets of tests, each of which consists of six nonnegative integers a, B, C, D, E, F (1<=a, d<=11, 0<=b, C, E, f<=59). For example, A=6, b=5, c=4, d=3, e=2, F=1 said that Hui-hui slept from 06:05:04 to 15:02:01.
Output:
Each set of test outputs contains only an integer s, which is the total number of seconds that FAI sleeps
Sample Input:
6 5 4 3 2 1
Sample Output:
32217
Idea: Convert the afternoon to 24 hours of writing, the hours and minutes are converted into seconds, in the afternoon time minus the morning time is the time to sleep
Difficulty: Very simple
Code:
1#include <stdio.h>2 intMain ()3 {4 inta,b,c,d,e,f,g;5 while(SCANF ("%d%d%d%d%d%d", &a,&b,&c,&d,&e,&f)! =EOF)6 {7G= (d+ A-a) * -* --c-b* -+f+e* -;8printf"%d\n", g);9 }Ten return 0; One}
Gdufe ACM-1087