User's AC Ratio

96.2% (77/80)

Submission's AC Ratio

29.3% (115/393)

Tags

Description

Given the start time and end time of a contest. Please calculate the amount of time for the contest.

Input Format

The first line contains three integers $h_{st},\ m_{st},\ s_{st}\ (0\leq h_{st}<24,\ 0\leq m_{st},\ s_{st}<60)$, representing the start time of a contest.
The second line contains three integers $h_{ed},\ m_{ed},\ s_{ed}\ (0\leq h_{ed}<24,\ 0\leq m_{ed},\ s_{ed}<60)$, representing the end time of the contest.

It is guaranteed that the start time must be earlier than the end time.

Output Format

One line contains three integers $h_{tot}\ m_{tot}\ s_{tot}$ - the amount of time for the contest.
The three integers must be in the ranges: $0 \leq h_{tot} < 24,\ 0 \leq m_{tot}, s_{tot} < 60$.
If any of the above integers has less than $2$ digits, fill in the prefix $0$. Please see the hint provided below.

Sample Input 1

06 23 54
08 51 39

Sample Output 1

02 27 45

Hints

Consider that $n=3$.
You can use
cout << setw(2) << setfill('0') << n;
to fill in the prefix $0$ if $n$ has less than $2$ digits.
That is, it prints out $03$.

Remember to add #include <iomanip> before you use setw() and setfill().

Problem Source

Subtasks

No. Testdata Range Score
1 0~9 100

Testdata and Limits

No. Time Limit (ms) Memory Limit (KiB) Output Limit (KiB) Subtasks
0 1000 65536 65536 1
1 1000 65536 65536 1
2 1000 65536 65536 1
3 1000 65536 65536 1
4 1000 65536 65536 1
5 1000 65536 65536 1
6 1000 65536 65536 1
7 1000 65536 65536 1
8 1000 65536 65536 1
9 1000 65536 65536 1