Square in Circle
Time Limit: 3 Seconds Memory Limit: 32768 KB
How many squares can be cut from a circle at most.
The problem comes from semiconductor industry. We want to know how many silicon chips can be cut from a circular wafer. And for some technical reason, all squares'(chips) sides should be parallel and it is only allowed to cut the circular wafer into several strips at the first working procedure.
NOTE: The chips in the circle should not be divided into pieces.
Input
Two numbers indicates the sidelength of square and the radius of circle respectively.
Two 0 indicates the end of the input.
Output
A number of squares on a single line which is guaranteed to fit a signed 16-bit integer.
Sample Input
1 1.42 1 0.8 0 0
Sample Output
4 1Submit
Source: ZOJ Monthly, November 2004