Time

18:03:05
22 May 2012
Version for print

Clocks

Clocks
The driking-clock strikes so many beats every hour as face has them from 1 to 12, and one time when the minute hand indicates 6 o’clock. Knowing the start and final period of 24-hours period( which exposes in hours and minutes), count the general number of strikes for this term.


Specifications

0<=H<=23, 0<=M<=59


Problem information

Time Limit: 1 seconds
Memory Limit: 64 MB
Balls for the passed test: 1
Complexity: 33% 257/385
Classes: Simple mathematics

Example

Example input

13 30 15 10

Example output

7


← Game Problems Cake →