Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
66148 刘宇轩 水仙花数II C++ Accepted 0 MS 272 KB 339 2024-03-02 16:16:33

Tests(10/10):


Code:

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