Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
157323 王晏林 水仙花数II C++ Accepted 1 MS 276 KB 349 2026-07-22 14:30:38

Tests(10/10):


Code:

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