Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- long long x,copie,aux;
- unsigned long long s;
- int n,i;
- int main()
- {
- cin>>n;
- for(i=1;i<=n;i++){
- cin>>x;
- aux=x;
- copie=0;
- while(aux){
- copie=copie*10+aux%10;
- aux=aux/10;
- }
- if(x==copie) s=s+x;
- }
- cout<<s;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement