Submission #978200

#TimeUsernameProblemLanguageResultExecution timeMemory
97820012345678Palindromes (info1cup18_palindromes)C++17
100 / 100
219 ms10068 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...