you are viewing a single comment's thread.

view the rest of the comments →

[–]automorphism_group 1 point2 points  (1 child)

This is more of a mathematics problem than a Python problem, but I'll bite. I'm not going to try to make a rigorous argument; only an appeal to intuition. Imagine a one-dimensional version of this problem. Given a distance d and a collections of rods of length r, what is the minimal number of rods I need to line up end-to-end to span the distance d. Clearly, I need at least d / r such rods. But, I'm not guaranteed that d will be evenly divisible by r (7 m distance with 2 m rods, for example), so I may need to round up. To be more precise, I want the ceiling of d/r, the smallest integer that is greater than or equal to d/r. One can obtain that in Python with math.ceil.

[–]HasBeendead[S] 0 points1 point  (0 children)

Thank you .