This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
#include <string>
using namespace std;
int main(){
long long int n,tot=0,x;
bool pos;
string str;
cin>>n;
while(n--){
cin>>str;
int m=str.length();
pos=true;
for(int i=0;i<m/2;i++){
if(str[i]!=str[m-i-1]){
pos=false;
break;
}
}
if(pos){
x=0;
for(int i=0;i<m;i++){
x*=10;
x+=str[i]-'0';
}
tot+=x;
}
}
cout<<tot;
}
# | 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... |