Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
66152 黎瑾萱 水仙花数II C++ Accepted 0 MS 272 KB 308 2024-03-02 16:27:41

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int m,n; bool flag=false; cin>>m>>n; int a,b,c; 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<<" "; flag=true; } } if(flag==false){ cout<<"no"; } return 0; }