# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
96029 | alextodoran | Palindromes (info1cup18_palindromes) | C++14 | 449 ms | 10020 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>
#define ll long long
using namespace std;
int n;
ll s;
vector <int> c;
int main()
{
cin >> n;
for(int i = 1; i <= n; i++)
{
int e;
cin >> e;
int e1 = e;
c.clear();
while(e)
{
c.push_back(e % 10);
e /= 10;
}
bool ok = 1;
for(int i = 0; i < c.size() / 2; i++)
if(c[i] != c[c.size() - i - 1])
{
ok = 0;
break;
}
s += ok * e1;
}
cout << s << "\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... |