做肯定都会做,不过C++中,a的n次方表示为:pow(a,n) 霖陆 · 发布于 2024-05-11 · 浏览 592 回复 0 include <bits/stdc++.h> using namespace std; int main() { int a,g,s,b; cin>>a; g=a%10; s=(a/10)%10; b=a/100; if(pow(b,3)+pow(s,3)+pow(g,3)==a) cout<<"YES"; else cout<<"NO"; return 0; }