Submission #685051

#TimeUsernameProblemLanguageResultExecution timeMemory
685051AiperiiiPalindromes (info1cup18_palindromes)C++14
100 / 100
413 ms13920 KiB
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; vector <int> a(n); for(int i=0;i<n;i++){ cin>>a[i]; } long long ans=0; for(int i=0;i<n;i++){ string s=to_string(a[i]); string t=to_string(a[i]); reverse(s.begin(),s.end()); if(s==t){ ans+=a[i]; } } cout<<ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...