Square in Circle

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
1

1个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐