Run ID:63884

提交时间:2024-01-20 11:10:23

#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; }