|Submit||All submissions||Best solutions||Back to list|
CLOCKPRO - Clock problems
|Wersja polska||English version|
John learns to read the time from a clock. The hardest cases are when both hands overlap. He would like to know how many times this troublesome situation will take place if he watches the clock from time A to time B.
There is an unknown number of tests. Each test consists of one line which contains the time when John starts observing the clock and the time when he finishes (both in format hh:mm; 00:00 ≤ A,B ≤ 23:59). The observation lasts less than 24 hours.
For each test the number of moments in which both hands will overlap, from time A to B.
13:05 13:06 Output: 22
|Added by:||Piotr Kąkol|
|Cluster:||Cube (Intel G860)|
|Languages:||All except: SCM qobi|
|Resource:||Problem AL_17_01 by Witold Długosz|
2014-09-26 01:55:01 Mitch Schwartz
2014-09-20 16:40:41 legrand
what is the answer for 12:00 12:00 : 0 or 1 ?
2014-09-17 02:02:29 Piotr KÄ…kol
Fixed. Thanks. :-)
2014-09-15 07:16:06 Mitch Schwartz
Time limit is too strict for slower languages, and there seems to be a formatting issue (maybe unexpected blank lines) for an early small input file.
(FYI, my initial Ruby submission needed 23.69s to pass an input file containing all possible cases on Cube cluster.)
Last edit: 2014-09-15 07:32:03