Submission #868732

# Submission time Handle Problem Language Result Execution time Memory
868732 2023-11-01T19:40:51 Z Codeuss Palindromes (info1cup18_palindromes) C++17
100 / 100
328 ms 10012 KB
#include <bits/stdc++.h>
using namespace std;
#define int long long

signed main(void){
    int n,sum = 0;
    cin >> n;
    for(int i = 1;i<=n;i++){
        int x;
        cin >> x;
        string s = to_string(x);
        string s1 = s;
        reverse(s1.begin(),s1.end());
        if(s == s1)sum += x;
    }
    cout << sum << '\n';
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 4 ms 348 KB Output is correct
3 Correct 213 ms 5008 KB Output is correct
4 Correct 231 ms 7504 KB Output is correct
5 Correct 308 ms 9992 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 2 ms 344 KB Output is correct
3 Correct 75 ms 1800 KB Output is correct
4 Correct 152 ms 3596 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 2 ms 344 KB Output is correct
3 Correct 75 ms 1800 KB Output is correct
4 Correct 152 ms 3596 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 4 ms 348 KB Output is correct
7 Correct 141 ms 3348 KB Output is correct
8 Correct 169 ms 4120 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 4 ms 348 KB Output is correct
3 Correct 213 ms 5008 KB Output is correct
4 Correct 231 ms 7504 KB Output is correct
5 Correct 308 ms 9992 KB Output is correct
6 Correct 0 ms 344 KB Output is correct
7 Correct 2 ms 344 KB Output is correct
8 Correct 75 ms 1800 KB Output is correct
9 Correct 152 ms 3596 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 4 ms 348 KB Output is correct
12 Correct 141 ms 3348 KB Output is correct
13 Correct 169 ms 4120 KB Output is correct
14 Correct 0 ms 344 KB Output is correct
15 Correct 10 ms 600 KB Output is correct
16 Correct 124 ms 4124 KB Output is correct
17 Correct 281 ms 9108 KB Output is correct
18 Correct 328 ms 9884 KB Output is correct
19 Correct 312 ms 9864 KB Output is correct
20 Correct 318 ms 10012 KB Output is correct