Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
20655 于俊杰 水仙花数 C++ Accepted 2 MS 724 KB 252 2021-12-11 18:32:54

Tests(10/10):


Code:

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