Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
125764 程诺 水仙花数II C++ Accepted 1 MS 268 KB 285 2025-07-15 14:54:25

Tests(10/10):


Code:

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