Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
64594 张江鹏 水仙花数II C++ Accepted 2 MS 272 KB 308 2024-01-21 17:05:58

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int n,zq2=0,zq=0,m,g=0,s=0,b=0,g2=0,s2=0,b2=0; cin>>n>>m; for(int x=n;x<=m;x++){ b=x/100; s=x/10%10; g=x%10; if(g*g*g+s*s*s+b*b*b==x){ cout<<x<<" "; zq=1; } } if(zq==0){ cout<<"no"; } return 0; }