SPEED - Circular Track
Two persons are running on a circular track either in the same direction or in the opposite direction, indefinitely. The speed of both of them is given to you. Speed will be positive in clockwise direction, and negative in anticlockwise direction. Print the number of distinct points, at which they will meet on the circle.
First line contains T, number of test cases. Each test case contains two integers, S1 and S2 (not equal to zero) which are the speeds of the two persons. S1 and S2 will be distinct.
Edited: All the numbers fit in signed 32-bit integer.
Print in a separate line, the number of distinct points at which they meet.
Input 2 1 2 1 -1 Output 1 2
.:: Pratik ::.:
What is the length of the track?