Incredible hulk

I run my code on mobile compiler it will show corresct results, but in CB compiler it shows an error of output.

hello @Manidev
pls share ur code

int main(){
int N,T,quo,K,step;
int j=0;
cin>>T;
//test case loop
for(int i=1;i<=T;i++){
cin>>N;
//find K
for(int dig=1;dig<=N;dig++){
quo= (dig/pow(2,j));
if(quo==1){
K=dig;
j++;
}
}
//find steps
step=1+(N-K);
cout<<step;
}
return 0;
}

add these two line in ur code.
include < iostream>
using namespace std;

and check this video tutorial for this problem

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.