Submission #674111

#TimeUsernameProblemLanguageResultExecution timeMemory
674111QwertyPiPalindromes (info1cup18_palindromes)C++14
100 / 100
388 ms9992 KiB
#include <bits/stdc++.h> #define int long long using namespace std; int ans = 0; int f(int x){ string s = to_string(x), t; t = s; reverse(t.begin(), t.end()); return (s == t) * x; } int32_t main(){ int n; cin >> n; for(int i = 0; i < n; i++){ int x; cin >> x; ans += f(x); } cout << ans << endl; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...