This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
int n, x, tmp;
long long res;
int main()
{
cin.tie(NULL)->sync_with_stdio(false);
cin>>n;
while (n--)
{
vector<int> v;
int f=0;
cin>>x;
tmp=x;
while (tmp>0) v.push_back(tmp%10), tmp/=10;
for (int i=0, j=v.size()-1; i<=j; i++, j--) if (v[i]!=v[j]) f=1;
if (!f) res+=x;
}
cout<<res;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |