#include <bits/stdc++.h> using namespace std; int main(){ long long a,b=0,c,d=1; cin>>a; while(1) { int d=d+log10(a); } for(int i=0;i<=a;i++) { c= pow (10,d); if(a%10>=0&&a>=10)b=b+a%10*c; d=d-1; if(a<10){ b=b+a; break;} } cout<<b<<endl; return 0; }

3 comments

  • 1

Information

ID
583
Time
1000ms
Memory
256MiB
Difficulty
4
Tags
(None)
# Submissions
179
Accepted
77
Uploaded By