You are viewing a single comment's thread. Return to all comments →
Here is my c++ solution, you can watch the explanation here : https://youtu.be/Plsx1i8dqiI
long strangeCounter(long t) { long last = 3, step = 3; while(t > last){ step *= 2; last += step; } return last - t + 1; }
Seems like cookies are disabled on this browser, please enable them to open this website
Strange Counter
You are viewing a single comment's thread. Return to all comments →
Here is my c++ solution, you can watch the explanation here : https://youtu.be/Plsx1i8dqiI