Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
63884 彭慕允 水仙花数II C++ Accepted 2 MS 272 KB 297 2024-01-20 11:10:23

Tests(10/10):


Code:

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