题解 100% AC
2025-08-22 21:50:34
发布于:江苏
5阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
string s;
string to8(int n){
if(n==0)return"";
to8(n/8);
s+=n%8;
return s;
}
int main(){
int n;
cin>>n;
if(n==0)cout<<"YES";
else{
string x=to8(n);
reverse(s.begin(),s.end());
if(x==s)cout<<"YES";
else cout<<"NO";
}
return 0;
}
这里空空如也
有帮助,赞一个