Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
65605 谢绍澜 水仙花数II C++ Accepted 2 MS 268 KB 333 2024-01-26 18:31:27

Tests(10/10):


Code:

# include<iostream> using namespace std; int main(){ int m,n,a,b,c,d=0; cin>>m>>n; for(int i=m;i<=n;i++){ a=i/100; b=i%100/10; c=i%100%10; if(i==a*a*a+b*b*b+c*c*c){ cout<<i<<" "; d=1; } } if(d==0) cout<<"no"; return 0; }