You are viewing a single comment's thread. Return to all comments →
I am trying your approach. I am calculating numebr of 1s after subtracting by 1.
unsigned long long int n; cin>>n; n = n-1; int count =0; while(n!=0){ if((n&1) ==1) count++; n=n>>1; } (count&1==0)?cout
But its not working :(
Seems like cookies are disabled on this browser, please enable them to open this website
Counter game
You are viewing a single comment's thread. Return to all comments →
I am trying your approach.
I am calculating numebr of 1s after subtracting by 1.
But its not working :(