~/algor $ cat problems/funksiya-vaqt-farqi
Difference between two times
Write a function TimeDiff(h1, m1, s1, h2, m2, s2) that returns how many seconds pass from $h_{1}$ hours $m_{1}$ minutes $s_{1}$ seconds to $h_{2}$ hours $m_{2}$ minutes $s_{2}$ seconds of the same day.
Example 1: TimeDiff(8, 30, 0, 10, 15, 30) → 6330 — $1$ hour $45$ minutes $30$ seconds have passed.
Example 2: TimeDiff(12, 0, 0, 12, 0, 0) → 0
Write only the function body.
Input
One line with six non-negative integers $h_{1}$, $m_{1}$, $s_{1}$, $h_{2}$, $m_{2}$ and $s_{2}$ — the arguments of the function.
Output
The value returned by the function: an integer.
Note
$0 \le h_{1}, h_{2} \le 23$
$0 \le m_{1}, m_{2}, s_{1}, s_{2} \le 59$
The second time is not earlier than the first.
Examples
8 30 0 10 15 30
6330
12 0 0 12 0 0
0