Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
13184 祝易涛 水仙花数 C++ Accepted 3 MS 724 KB 257 2021-05-25 17:13:01

Tests(10/10):


Code:

#include <iostream> using namespace std; int main() { int n,g,s,b,j,x,sum=0; cin>>j>>x; for(n=j;n<=x;n++) { g=n%10; s=(n/10)%10; b=n/100; if(g*g*g+s*s*s+b*b*b==n){ cout<<n<<endl;sum++;} } if(sum==0) cout<<"no"; return 0; }