using namespace std;
#include<iostream>
#include<cmath>
int main()
{
int n;
cin>>n;
int temp;
int m=0;
for(int i=0;i<n;i++)
{
cin>>temp;
m += pow(10,i)*temp;
cout<<"\n"<<m<<"\n";
}
return 0;
}
OUTPUT
5
1
1
2
21
3
320
4
4320
5
54319
I wanted to get 54321 but instead got this for some reason a 1 is getting removed in the 3rd and last loop.