Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
125761 | 程诺 | 水仙花数II | C++ | Wrong Answer | 0 MS | 272 KB | 286 | 2025-07-15 14:53:11 |
#include<bits/stdc++.h> using namespace std; int main(){ int m,n,g,s,b; cin>>m>>n; int cnt=0; for(int i=1;i<=n;i++){ g = i%10; s = i/10%10; b = i/100; if(g*g*g+s*s*s+b*b*b==i){ cout<<i<<endl; cnt++; } } if(cnt==0){ cout<<"no"; } return 0; }
------Input------
400 600
------Answer-----
407
------Your output-----
1 153 370 371 407