Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int a, b, max, n, frecv[100], c, epalindrom=1, PP=10000000, P=1, m=0 ;
- cin>>n;
- for(c=0; c<=9 &&eplaindrom; c++)
- {
- frecv[c]=cif(n,c);
- if(frecv[c]%2)
- epalindorm=0;
- }
- if(!epalindrom)
- cout<<0;
- else
- {
- for(c=9; c>=0; c--)
- while(frecv[c])
- {
- m+=c*PP+c*P;
- PP/=10;
- P=P*10;
- frecv[c]=frecv[c]-2;
- }
- cout<<m;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement