Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
68242 谢绍澜 水仙花数II C++ Accepted 1 MS 272 KB 327 2024-03-21 18:34:43

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%10; b=i/10%10; c=i/100; if(i==a*a*a+b*b*b+c*c*c){ cout<<i<<" "; d++; } } if(d==0) cout<<"no"; return 0; }