SHARE
TWEET

Untitled

a guest Feb 21st, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top