Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
138725 王丞杰 水仙花数II C++ Accepted 1 MS 264 KB 285 2025-11-29 16:17:42

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int m,n,f=0; scanf("%d%d",&m,&n); for(int x=m;x<=n;x++){ if((x%10)*(x%10)*(x%10)+(x/10%10)*(x/10%10)*(x/10%10)+(x/100)*(x/100)*(x/100)==x){ printf("%d ",x); f++; } } if(f==0)cout<<"no"; return 0; }