Submission #666542

# Submission time Handle Problem Language Result Execution time Memory
666542 2022-11-28T23:30:24 Z divad Palindromes (info1cup18_palindromes) C++14
100 / 100
427 ms 10000 KB
/// lucrez probleme de pe oj.uz omg!!!
#include <iostream>
#include <algorithm>
#define int long long
using namespace std;
int n,x,ans;

signed main()
{
    cin >> n;
    for(int i = 1; i <= n; i++){
        cin >> x;
        string s = to_string(x);
        string rev = s;
        reverse(rev.begin(), rev.end());
        if(rev.compare(s) == 0){
            ans += x;
        }
    }
    cout << ans;
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 5 ms 312 KB Output is correct
3 Correct 198 ms 5004 KB Output is correct
4 Correct 292 ms 7448 KB Output is correct
5 Correct 395 ms 9880 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 2 ms 212 KB Output is correct
3 Correct 84 ms 1668 KB Output is correct
4 Correct 177 ms 3108 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 2 ms 212 KB Output is correct
3 Correct 84 ms 1668 KB Output is correct
4 Correct 177 ms 3108 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 7 ms 372 KB Output is correct
7 Correct 176 ms 3328 KB Output is correct
8 Correct 211 ms 3984 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 5 ms 312 KB Output is correct
3 Correct 198 ms 5004 KB Output is correct
4 Correct 292 ms 7448 KB Output is correct
5 Correct 395 ms 9880 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 2 ms 212 KB Output is correct
8 Correct 84 ms 1668 KB Output is correct
9 Correct 177 ms 3108 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 7 ms 372 KB Output is correct
12 Correct 176 ms 3328 KB Output is correct
13 Correct 211 ms 3984 KB Output is correct
14 Correct 0 ms 212 KB Output is correct
15 Correct 13 ms 592 KB Output is correct
16 Correct 164 ms 4104 KB Output is correct
17 Correct 378 ms 9096 KB Output is correct
18 Correct 398 ms 9880 KB Output is correct
19 Correct 427 ms 9880 KB Output is correct
20 Correct 393 ms 10000 KB Output is correct