Submission #403825

#TimeUsernameProblemLanguageResultExecution timeMemory
403825IwanttobreakfreePalindromes (info1cup18_palindromes)C++98
100 / 100
386 ms9872 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...