Your code is too slow.
Execution Timed Out (16000 ms)
Nice kata, thank you!
It was nice to see a broad range of ways in which this (at least in C) had been solved too.
Can't be changed.
should be 5 kyu.
48 -> 24 -> 12 -> 6 -> 3 Strength 5
56 -> 28 -> 14 -> 7 Strength 4
how come [48, 56] --> 48
A little typo in the description: "Note that programs must run within the allot[T]ed server time".
"Note that programs must run within the allot[T]ed server time"
Its more complicate than it looks like just because the time out thing. Don't try to do 2 loops or a recursive function; it will compile and run but wont be enough. I wasted a lot of time with that.
In short, your solution (algorithm) is inefficient such that it does not pass all the test cases within the 12000ms window in which all code is allowed to run on the Codewars server(s). More about that here --> https://en.wikipedia.org/wiki/Time_complexity
It means dividing by 2 evenly. The "before we reach an odd number" gives it away. I should use the word "evenly" in description so it's more clear.
What does it mean to "successfully" divide by 2 "before we reach an odd number"? Dividing by 2 evenly? Dividing by 2 such that the quotient is an even number? Both?
please help me ? why i got 12000 ms server error
This comment is hidden because it contains spoiler information about the solution