Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
113263 | 欧阳俊懿 | 水仙花数II | C++ | Accepted | 1 MS | 272 KB | 293 | 2025-03-15 16:06:25 |
#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; }