UVA 12050 - Palindrome Numbers UVA • Sep 1, 2020 Problem PDFSolution:/****************************************************************** *** Author : Shipu Ahamed (Psycho Timekiller) *** *** E-mail : [email protected] *** *** University : BUBT,Dept. of CSE *** *** Team : BUBT_HIDDEN *** *** Facebook : http://www.facebook.com/DeesheharaShipu *** ******************************************************************/ #include using namespace std; typedef vector vi; #define ll long long #define pb push_back ////============ CONSTANT ===============//// #define mx 30 ////====================================//// ll pal[mx]; void palindrome() { pal[1]=9; pal[2]=9; ll range=18; for(int len=3;len2000000000) break; } } int main() { palindrome(); ll n; while(scanf("%lld",&n)) { if(n==0) break; vi v; for(int i=1;i<=mx;i++) { if(n<=pal[i]) { int m; if(i%2) m=(i+1)/2; else m=i/2; for(int j=0;j=0;l--) v.pb(v[l]); break; } else n=n-pal[i]; } int s=v.size(); for(int i=0;ihttps://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/12050/12050.cpp Tags UVA Competitive Programming Shipu Ahamed Recommended for you UVA UVA 913 - Joana and the Odd Numbers 4 years ago • 1 min read UVA UVA 871 - Counting Cells in a Blob 4 years ago • 3 min read UVA UVA 866 - Intersecting Line Segments 4 years ago • 3 min read