(2405)How many minutes?——C语言初学者百题大战之六
Time Limit:1000MS Memory Limit:65536K
Total Submit:5331 Accepted:3239
Description
How many minutes do you spend on the problem?
Input
The input consists of two lines.
The first line contains two integer h1 and m1, separated from the symbol :, and h1:m1 is the time you begin to do the problem.
The second line contains two integer h2 and m2, separated from the symbol :, and h2:m2 is the time you finished the problem.
Output
You should output how many minutes you have spended on the problem on one line. Sample Input
9:10
9:20
Sample Output
10
Source
yhr
答案:
#include
int main()
{
int h1,h2,m1,m2,s;
scanf("%d:%d",&h1,&m1);