Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
119116 | 曹春贵 | 水仙花数II | C++ | Wrong Answer | 1 MS | 268 KB | 326 | 2025-05-16 20:06:43 |
#include<bits/stdc++.h> using namespace std; int main() { int m,n; bool flag = false; cin>>m>>n; for(int i=m;i<=n;i++) { int a,b,c; a=i%10; b=i/10%10; c=i/100; if((c*c*c+b*b*c+a*a*a)==i) { flag = true; cout<<i<<" "; } } if(!flag) { cout<<"no"<<endl; } return 0; }
------Input------
400 600
------Answer-----
407
------Your output-----
407 476 594