Class assignment

output is correct but test cases are not passing

Hey @nmaurya760
Small updation i.e you have to print test case number and not n
for(int i=1;i<=t;i++){ //changed to for loop so that we can print testcase no
int n;
cin>>n;
cout<<"#"<<i<<" : "<<solve(n)<<endl; //printing i instead of n
}

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.