题解
2024-08-29 16:52:51
发布于:江苏
1阅读
0回复
0点赞
#include<bits/stdc++.h>
#define ll long long //防抄袭标记
#define MAXN 100005
#define maxn 1000005
#define MAXM 10000005
#define maxm 100000005
using namespace std;
int n;
int a[5];
int main(){
cin>>n;
int m = n;
a[3] = n%10;
n/=10;
a[2] = n%10;
n/=10;
a[1] = n%10;
n/=10;
if(pow(a[1],3)+pow(a[2],3)+pow(a[3],3) == m){
cout<<"YES";
}
else cout<<"NO";
return 0;
}
这里空空如也
有帮助,赞一个