Problem Statement | |||||||||||||
Synchronize your watches to 12:00 ....... now!
We have a collection of watches whose hands move continuously. Create a class Synchro that contains a method resynch that is given a int[] watch telling how many minutes the hand of each watch advances in an hour and that returns the position of the minute hands (in minutes past the hour) at the first time when the minute hands all exactly agree again. Each element of watch describes a different watch. The returned value should be a non-negative double less than 60. Ignore (or rip off!) the hour hands. | |||||||||||||
Definition | |||||||||||||
| |||||||||||||
Notes | |||||||||||||
- | The returned value must be accurate to within a relative or absolute value of 1E-9. | ||||||||||||
Constraints | |||||||||||||
- | watch will contain between 2 and 10 elements, inclusive. | ||||||||||||
- | Each element of watch will be between 1 and 200, inclusive. | ||||||||||||
Examples | |||||||||||||
0) | |||||||||||||
| |||||||||||||
1) | |||||||||||||
| |||||||||||||
2) | |||||||||||||
| |||||||||||||
3) | |||||||||||||
|