You are viewing a single comment's thread. Return to all comments →
int t; unsigned long long int n; cin>>t; for(int i=1;i<=t;i++) {int count=0; cin>>n; while(n!=1) { if(!(n & (n-1))) n=n/2; else n=n-pow(2,floor(log (n)/log (2))); count++ ; } if(count%2==0) cout<<"Richard"<<endl; else cout<<"Louise"<<endl; }
can i plz get some help on this... test cases are rejecting this code..
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 →
can i plz get some help on this... test cases are rejecting this code..