답안 #839890

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
839890 2023-08-30T20:03:53 Z theagentbara Palindromes (info1cup18_palindromes) C++14
100 / 100
331 ms 9940 KB
#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define dl double
#define pb push_back
#define MOD 1000000007
  
int main (){
    ll n, a, rev, sum = 0;
    cin>>n;
    while(n--){
        ll b;
        rev = 0;
        cin>>a;
        ll x = a;
        while(a != 0){
            b = a % 10;
            rev = rev * 10 + b;
            a /= 10;
        }
        if(x == rev){
            sum += x;
        }
    }
    cout<<sum;

    return 0; 
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 4 ms 412 KB Output is correct
3 Correct 140 ms 5008 KB Output is correct
4 Correct 213 ms 7468 KB Output is correct
5 Correct 285 ms 9868 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 2 ms 212 KB Output is correct
3 Correct 62 ms 1684 KB Output is correct
4 Correct 123 ms 3096 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 2 ms 212 KB Output is correct
3 Correct 62 ms 1684 KB Output is correct
4 Correct 123 ms 3096 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 4 ms 340 KB Output is correct
7 Correct 123 ms 3208 KB Output is correct
8 Correct 142 ms 4092 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 4 ms 412 KB Output is correct
3 Correct 140 ms 5008 KB Output is correct
4 Correct 213 ms 7468 KB Output is correct
5 Correct 285 ms 9868 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 2 ms 212 KB Output is correct
8 Correct 62 ms 1684 KB Output is correct
9 Correct 123 ms 3096 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 4 ms 340 KB Output is correct
12 Correct 123 ms 3208 KB Output is correct
13 Correct 142 ms 4092 KB Output is correct
14 Correct 0 ms 212 KB Output is correct
15 Correct 9 ms 592 KB Output is correct
16 Correct 117 ms 4120 KB Output is correct
17 Correct 249 ms 8848 KB Output is correct
18 Correct 288 ms 9868 KB Output is correct
19 Correct 331 ms 9876 KB Output is correct
20 Correct 282 ms 9940 KB Output is correct