#B3787. Precise Timer

    ID: 11444 Type: Default 1000ms 256MiB

Precise Timer

Precise Timer

You are given two timestamps recorded by a very precise timer. The timer counts 100 times per second, which means the interval between two consecutive counts is exactly \(0.01\) seconds. Each timestamp is in the format \(HH:MM:SS.xx\) where:

  • \(HH\) represents the hour (00 to 23),
  • \(MM\) represents the minute (00 to 59),
  • \(SS\) represents the second (00 to 59),
  • \(xx\) represents the hundredths of a second (00 to 99).

Your task is to calculate the total number of centiseconds (i.e. \(0.01\) second ticks) that were counted from the first recorded timestamp to the second recorded timestamp inclusive. In other words, if the first timestamp is \(T_1\) and the second is \(T_2\), you need to compute:

[ \text{Result} = (T_2 - T_1) + 1 ]

For example, consider the process from 13:01:02.37 to 13:01:03.01:

13:01:02.37
13:01:02.38
...
13:01:02.99
13:01:03.00
13:01:03.01

There are 65 timer counts in total, so the output should be 65.

inputFormat

The input consists of two lines. The first line contains the starting timestamp and the second line contains the ending timestamp, both in the format HH:MM:SS.xx.

outputFormat

Output a single integer representing the total number of centiseconds (\(0.01\) seconds ticks) counted from the starting time to the ending time inclusive.

sample

13:01:02.37
13:01:03.01
65