题解
2025-08-22 19:42:11
发布于:江苏
3阅读
0回复
0点赞
#include<iostream>
#include<algorithm>
using namespace std;
int n;
string s;
void f(int n){
if(n==0){
return;
}
f(n/8);
s+=n%8;
}
int main(){
cin>>n;
f(n);
string x=s;
reverse(s.begin(),s.end());
if(x==s){
cout<<"YES";
}else{
cout<<"NO";
}
return 0;
}
这里空空如也
有帮助,赞一个