Problem
I’ve taken the number as string
then i have reversed it
removed the zeros if any in starting
then printed the value left
What is my Mistake
#include <bits/stdc++.h>
using namespace std;
int main()
{
int t,temp=0;
string n;
cin>>t;
++t;
while(--t)
{ cin>>n;
reverse(n.begin(),n.end());
int sz = n.size();
//vector<int> v;
while(n[temp]=='0'){
temp++;
}
n.erase(0,temp);
for(char k:n){
// cout<<k<<endl;
cout<<k;
}
cout<<"\n";
}
}