Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
115114 殷佳雨萱 水仙花数II C++ Accepted 1 MS 272 KB 267 2025-03-29 11:49:25

Tests(10/10):


Code:

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