Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
115119 刘佳宇 水仙花数II C++ Accepted 1 MS 272 KB 276 2025-03-29 11:56:05

Tests(10/10):


Code:

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