# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
411776 | Alexandra | Palindromes (info1cup18_palindromes) | C++14 | 134 ms | 9924 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 <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <math.h>
#include <algorithm>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(NULL);
long long int n, a, resp=0;
cin >> n;
vector <int> digitos;
for (int i=0; i<n; i++) {
string num;
cin >> num;
bool palin = true;
for (int j=0; j<num.size(); j++) {
if (num[j] != num[num.size()-1-j]) {
palin = false;
break;
}
}
if (palin==true) {
resp += stoi(num);
}
}
cout << resp;
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... |