We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Your solution passes all the tests. But it would fail on k > n, for example k = 8, n = 5 must end up in 4, but in 7 it does. Moderators should add such a test. So the better solution is:
Day 29: Bitwise AND
You are viewing a single comment's thread. Return to all comments →
Your solution passes all the tests. But it would fail on
k > n
, for examplek = 8, n = 5
must end up in 4, but in 7 it does. Moderators should add such a test. So the better solution is: