Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
94666 任斌 水仙花数II C++ Accepted 1 MS 272 KB 288 2024-10-26 10:34:09

Tests(10/10):


Code:

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