Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
17 邓小龙 水仙花数II C++ Accepted 0 MS 264 KB 432 2022-07-17 09:08:17

Tests(10/10):


Code:

#include<iostream> using namespace std; int main(){ int m,n,j; int a; bool f=false; cin>>m>>n; for(int i=m;i<=n;i++) { a=0; j=i; while(j) { a=a+(j%10)*(j%10)*(j%10); j=j/10; } if(a==i) { cout<<i<<" "; f=true; } } if(!f) cout<<"no"; return 0; }