Submission #685452

# Submission time Handle Problem Language Result Execution time Memory
685452 2023-01-24T11:50:45 Z TomitaMatei Palindromes (info1cup18_palindromes) C++14
35 / 100
413 ms 9804 KB
#include <iostream>

using namespace std;
int palindrom (int x)
{
    int p=1,nr=0;
    while (x>=p)
    {
        p=p*10;
        nr=nr*10+x%10;
        if (nr==x) return 1;
        x=x/10;
    }
    if (x==nr)
    return 1;
    return 0;

}

int n,i;
int unsigned long long s,a;
int main()
{
    cin>>n;
    for (i=1; i<=n; i++)
    {
        cin>>a;
        if (palindrom(a)) s=s+a;
    }
    cout<<s;
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 6 ms 340 KB Output is correct
3 Correct 175 ms 5008 KB Output is correct
4 Correct 267 ms 7444 KB Output is correct
5 Correct 413 ms 9804 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 2 ms 212 KB Output is correct
3 Correct 82 ms 1676 KB Output is correct
4 Correct 217 ms 3076 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 2 ms 212 KB Output is correct
3 Correct 82 ms 1676 KB Output is correct
4 Correct 217 ms 3076 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Incorrect 5 ms 316 KB Output isn't correct
7 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 6 ms 340 KB Output is correct
3 Correct 175 ms 5008 KB Output is correct
4 Correct 267 ms 7444 KB Output is correct
5 Correct 413 ms 9804 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 2 ms 212 KB Output is correct
8 Correct 82 ms 1676 KB Output is correct
9 Correct 217 ms 3076 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Incorrect 5 ms 316 KB Output isn't correct
12 Halted 0 ms 0 KB -