# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
363227 | Tenis0206 | Palindromes (info1cup18_palindromes) | C++14 | 104 ms | 9964 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
int n;
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
cin>>n;
long long rez = 0;
for(int i=1;i<=n;i++)
{
string s;
cin>>s;
bool ok = true;
for(int i=0;i<s.size()/2;i++)
{
if(s[i]!=s[s.size()-i-1])
{
ok = false;
break;
}
}
if(ok)
{
int nr = 0;
for(auto it : s)
{
nr = nr*10 + it - '0';
}
rez+=nr;
}
}
cout<<rez<<'\n';
return 0;
}
Compilation message (stderr)
# | 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... |