ÀÂÒ
Language:

Remote Training on Programming

Problems On-line status Contests FAQ
For authors:
Register  ||  Login
 
Hello, Guest! Login or register.

413. Clock

Time Limit: 1 seconds
Memory Limit:64000KB
Points:10
View Problem Statistics Submit Problem added Undefined

Clock's hands move with constant angular speeds and show h hours and m minutes.
Write the program to find number of full minutes till the nearest moment in which hands will coincide.

Input

Two numbers h (0<=h<=11) and m (0<=m<=59), separeated by space.

Output

Number of full minutes.

Samples

InputOutput
0 00
1 14

View Problem Statistics Submit Author/source:
Problems from Contests / VoSTU Selection Rounds / Selection Round on ACM ICPC 2007 /
413. 411. Equal Sums 414. Shortest Expression 412. Texture
We can all benefit by doing occasional "toy" programs, when artificial restrictions are set up, so that we are forced to push our abilities to the limit. The art of tackling miniproblems with all our energy will sharpen our talents for the real problems. Donald E. Knuth.
time generating 0.031 sec.
© Copyright VSTU, AVT, Nosov D.A.