Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
87231 黄睿杰 水仙花数 C++ Accepted 3 MS 272 KB 266 2024-08-07 19:34:18

Tests(10/10):


Code:

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