编程介的小学生 2017-03-30 16:01 采纳率: 20.5%
浏览 1022
已采纳

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条回答 默认 最新

  • threenewbee 2017-04-09 08:59
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器