View Single Post
Old 2021-08-09, 10:41   #9
Just call me Henry
henryzz's Avatar
Sep 2007
Liverpool (GMT/BST)

135758 Posts

Originally Posted by LaurV View Post
grrr... as this is an even number, you just divide it by its half to get to 2. <-Scratch that! Missed the part about the square root. Anyhow, minimum number of steps is always deterministic and it has nothing to do with the "number theory", more with programming, think about writing your number in binary and do some "magic" with it... I can't believe you wrote so much text for such a trivial problem, and these guys here fell into this trap.
Unless I am missing something you could divide it by 2 though.

The following may or may not be optimal(likely not)
106 / 2
53 - 1
52 / 4
13 - 1
12 / 3
4 / 2
henryzz is offline   Reply With Quote