Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
113804 陈铎文 水仙花数II C++ Accepted 1 MS 272 KB 316 2025-03-16 15:41:27

Tests(10/10):


Code:

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