Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
113799 | 陈铎文 | 水仙花数II | C++ | Wrong Answer | 1 MS | 272 KB | 302 | 2025-03-16 15:11:46 |
#include<bits/stdc++.h> using namespace std; int main() { int m,n,a,b,c; int t=0; cin>>m>>n; for(int i=n;i<=m;i++){ a=i/100; a=a*a*a; b=i/10%10; b=b*b*b; c=i%100; c=c*c*c; if(a+b+c==i){ t=1; cout<<i<<" "; } } if(t==0) cout<<"no"; return 0; }
------Input------
400 600
------Answer-----
407
------Your output-----
no