A307.水仙花数题解:
2026-02-09 09:20:06
发布于:四川
0阅读
0回复
0点赞
A307.水仙花数
#include<bits/stdc++.h>
using namespace std;
int main(){
int n,a,b,c;
cin >> n;
a=n/100;
b=n/10%10;
c=n%10;
if(pow(a,3)+pow(c,3)+pow(b,3)==n){
cout << "YES";
}else cout << "NO";
return 0;
}
这里空空如也






有帮助,赞一个