Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
138729 田祥江 水仙花数II C++ Accepted 0 MS 280 KB 274 2025-11-29 16:18:24

Tests(10/10):


Code:

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