Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
125767 | 田子熙 | 水仙花数II | C++ | Wrong Answer | 0 MS | 268 KB | 290 | 2025-07-15 14:54:54 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,m,a,b,c,cnt; cin>>m>>n; for(int i=m;i<=n;i++){ a=i%10; b=i/10%10; c=i/100; if(a*a*a+b*b*b+c*c*c==i){ cout<<i<<endl; cnt++; return 0; } } if(cnt==0){ cout<<"no"; } return 0; }
------Input------
264 962
------Answer-----
370 371 407
------Your output-----
370