Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
155923 邓弘锐 水仙花数II C++ Accepted 1 MS 276 KB 297 2026-06-14 15:14:37

Tests(10/10):


Code:

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