Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. long long x,copie,aux;
  5. unsigned long long s;
  6. int n,i;
  7. int main()
  8. {
  9. cin>>n;
  10. for(i=1;i<=n;i++){
  11. cin>>x;
  12. aux=x;
  13. copie=0;
  14. while(aux){
  15. copie=copie*10+aux%10;
  16. aux=aux/10;
  17. }
  18. if(x==copie) s=s+x;
  19. }
  20. cout<<s;
  21. return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement