# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1134063 | bpptidp | Palindromes (info1cup18_palindromes) | C++20 | 235 ms | 412 KiB |
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
int n;
cin>>n;
ll sum=0;
for(int i=0,x,m;i<n;++i){
cin>>x;
string s=to_string(x);
m=s.size();
bool ok=1;
for(int j=0;j<m/2;++j)
ok&=(s[j]==s[m-j-1]);
sum+=ok*x;
}
cout<<sum;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |