Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
141148 令狐文丽 回文数 C++ Accepted 0 MS 272 KB 563 2025-12-21 12:07:58

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ /** for(int i =1;i<=6;i++){ //if(i==5)break;//break代表退出循环 if(i==3)continue;//退出本次循环 cout<<i<<" "; } int i =1; cout<<--i<<endl;//i-- i=i-1 --i i=i-1 cout<<i; int g s,b; if(g==s and s==b){ cout<<i<<" "; }**/ int n; cin>>n;//正读 int rn=0,a;//反读 //n=12345 //反读 a=n; while(a!=0){ rn=rn*10+a%10; a=a/10; } //正和反做比较 if(n==rn){ cout<<"YES"; } else{ cout<<"NO"; } return 0; }