Time difference

Report a typo

We are going to consider two moments in time that happened on the same day — hours, minutes, and seconds. It is known that the second moment happened not earlier than the first one. Find how many seconds passed between the two moments.

Input data format

The program receives three integers: hours, minutes, seconds of the first moment, and three integers of the second moment.

Output data format

Output the number of seconds between these two moments.

Sample Input 1:

1
1
1
2
2
2

Sample Output 1:

3661

Sample Input 2:

1
2
30
1
3
20

Sample Output 2:

50
Write a program in Kotlin
fun main() {
// put your code here
}
___

Create a free account to access the full topic