Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
36155 王皓暄 中级第五课——找回文数1 C++ 编译错误 0 MS 0 KB 310 2024-01-08 20:15:56

Tests(0/0):


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; }


测评信息: