Submission #637178

#TimeUsernameProblemLanguageResultExecution timeMemory
637178tvladm2009Palindromes (info1cup18_palindromes)C++14
100 / 100
397 ms10064 KiB
#include <iostream> using namespace std; typedef long long ll; int n; bool epal(int x) { int cx = x; ll pal = 0; while (x) { pal = pal * 10 + x % 10; x /= 10; } return pal == cx; } int main() { cin >> n; ll ans = 0; for (int i = 1; i <= n; i++) { int x; cin >> x; ans += x * epal(x); } cout << ans; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...