You are viewing a single comment's thread. Return to all comments →
C++ solution :
#include<iostream> using namespace std; int main() { long bound=3, t; cin >> t; while(t>bound) { t-=bound; bound*=2; } cout << (bound-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 →
C++ solution :