Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
7156 张文曦 水仙花数II C++ Accepted 0 MS 272 KB 346 2025-04-05 14:17:43

Tests(10/10):


Code:

#include<iostream> using namespace std; int main(){ int n,m,g,s,b; bool f=0; cin>>m>>n; for(int i=m;i<=n;i++){ g=i%10; s=i/10%10; b=i/100; if(i==g*g*g+b*b*b+s*s*s){ cout<<i<<' '; f=1; } } if(f==0){ cout<<"no"; } return 0; }