Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
160325 Kevin 水仙花数 C++ Accepted 1 MS 272 KB 377 2026-09-15 16:03:07

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; bool sxh(int n){ int ge=n%10; int shi=n/10%10; int bai=n/100; if(ge*ge*ge+shi*shi*shi+bai*bai*bai==n){ return true; } else{ return false; } } int main() { int m,n,flag=0; cin>>m>>n; for(int i=m;i<=n;i++){ if(sxh(i)){ cout<<i<<" "; flag++; } } if(flag==0) cout<<"no"; return 0; }