#include<iostream>
using namespace std;
int main()
{
int n ;
int t = n;
int sum = 0;
int cnt = 0;
while(t!=0)
{
sum = sum*10+t%10;
t = t/10;
}
if(sum == n)
{
break;
}
else
{
n = n+sum;
cnt++;
}
cout<<sum;
return 0;
#include<iostream>
using namespace std;
int main()
{
int n;
cin>>n;
int cnt = 0;
int sum = 0;
for(int i = 1;true;i++)
{
for(int j = 1;j<=i;j++)
{
sum = sum+i;
cnt++;
if(cnt == n)
{
break;
}
}
if(cnt == n)
{
break;
}
}
cout<<sum;
#include<iostream>
using namespace std;
int main()
{
int n;
cin>>n;
int max = 0;
for(int x = 1;x<(n-2)/2;x++)
{
int y = (n-2*x)/2;
cout<<x<<" "<<y<<" "<<x*y<<endl;
if(x*y<max)
{
max = x*y;
}
}
cout<<max;
return 0;
#include<iostream>
using namespace std;
int main()
{
int n;
cin>>n;
for(int i = 1;i<=n;i++)
{
for(int j = 1;j<=i;j++)
{
cout<<i<<" ";
}
}
return 0;