Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
64617 殷震轩 水仙花数II C++ Accepted 2 MS 272 KB 338 2024-01-21 17:14:56

Tests(10/10):


Code:

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