Run ID Author Problem Lang Verdict Time Memory Code Length Submit Time
81412 sh25_zhangyy 中级第五课——找回文数1 C++ Accepted 1 MS 248 KB 311 2026-01-04 18:05:27

Tests(1/1):


#include<bits/stdc++.h> using namespace std; bool hw(string str){ for(int j=0;j<str.length()/2;j++){ if((str[j]==str[str.length()-1-j])){ }else{ return false; } } return true; } int main(){ for(int i=2;i<=10000;i++){ if(hw(to_string(i))==1){ cout<<i<<' '; } } return 0; }


Judgement Protocol: