이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
int n, x, tmp;
long long res;
int main()
{
cin.tie(NULL)->sync_with_stdio(false);
cin>>n;
while (n--)
{
vector<int> v;
int f=0;
cin>>x;
tmp=x;
while (tmp>0) v.push_back(tmp%10), tmp/=10;
for (int i=0, j=v.size()-1; i<=j; i++, j--) if (v[i]!=v[j]) f=1;
if (!f) res+=x;
}
cout<<res;
}
# | 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... |