Submission #524917

#TimeUsernameProblemLanguageResultExecution timeMemory
524917lucriPalindromes (info1cup18_palindromes)C++17
100 / 100
400 ms10052 KiB
#include <iostream> using namespace std; long long n,s,x; bool palindrom(long long n) { long long cn=n,rn=0; while(cn) { rn*=10; rn+=cn%10; cn/=10; } if(n==rn) return true; return false; } int main() { cin>>n; while(n--) { cin>>x; if(palindrom(x)) s+=x; } cout<<s; 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...