Advertisement
edutedu

Untitled

Dec 4th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. int a, b, max, n, frecv[100], c, epalindrom=1, PP=10000000, P=1, m=0 ;
  2. cin>>n;
  3. for(c=0; c<=9 &&eplaindrom; c++)
  4. {
  5. frecv[c]=cif(n,c);
  6. if(frecv[c]%2)
  7. epalindorm=0;
  8.  
  9. }
  10. if(!epalindrom)
  11. cout<<0;
  12. else
  13. {
  14. for(c=9; c>=0; c--)
  15. while(frecv[c])
  16. {
  17. m+=c*PP+c*P;
  18. PP/=10;
  19. P=P*10;
  20. frecv[c]=frecv[c]-2;
  21. }
  22. cout<<m;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement