Home > other >  Introduction to Python questions to solve
Introduction to Python questions to solve

Time:11-16

Title description
[title description]
Are you a sleep, one day was caught by the teacher, the teacher is very interesting, ask a question: "given to sleep time and wake up time, calculate how long it will take a total sleep", if the correct answer can be free from punishment, time to sleep and wake up all the time with 24-hour notation (see note), and know that sleeping time for at least 1 second, up to 24 hours,
Enter
[input format]
Describe sleep time input the first line, the second line description up moment, two moments are using "HH MM SS", including "HH" said, the range is 0 to 23, "MM" said points, the range is 0 to 59, "SS" describe the seconds, the range is 0 to 59,
O
Output format []
How long did a total sleep, output format as input,

[input and output sample 1]
Sleep. In sleep. Out
20 0 0
4 8 0 0 0 0


[input and output sample 2]
Sleep. In sleep. Out
12 34 56
14 and 22 2 1 26


[note]
24 hours, is a kind of representation method of time, to distinguish it from 12 hours,
In the system of 24 hours, the afternoon 1 point written by 13 points, 2 PM was writing 14 points,
Although, in life, we use more is 12 hours, we say, for example, at 5 p.m. to go off work, what we said, "toward 9 evening 5" is refers to, at 9 am and 5 PM (ordinary staff commuting time), but in science and rigorous notes, in the contract and other legal documents, must write 24-hour time,
The sample input
12 34 56
14 and 22
Sample output
2 1 26
  • Related