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 <iostream>
using namespace std;
typedef long long ll;
int n;
bool epal(int x) {
int cx = x;
ll pal = 0;
while (x) {
pal = pal * 10 + x % 10;
x /= 10;
}
return pal == cx;
}
int main() {
cin >> n;
ll ans = 0;
for (int i = 1; i <= n; i++) {
int x;
cin >> x;
ans += x * epal(x);
}
cout << ans;
return 0;
}
# | 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... |