ceil(A/B) < C closed form
Разница между en1 и en2, 0 символ(ов) изменены
Recently, I came upon this problem:↵
↵
Given: A, C, and that ceil(A/B) < C↵
↵
Find: the smallest B possible↵
↵
My solution was using binary search. ↵
However, the official solution came up with this clever closed form formula:↵
↵
~~~~~↵
B = ceil(A/(C-1))↵
~~~~~↵
↵
I'm completely boggled by this equation. I've seen quite a few closed form equations involving floor and ceil before, but I can't find how they are derived.↵
↵
Any help, explanation, or pointers appreciated!

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский cartesian_bearrr 2023-02-26 08:58:41 0 (published)
en1 Английский cartesian_bearrr 2023-02-26 08:58:10 497 Initial revision (saved to drafts)