Run ID:109082
提交时间:2025-01-25 19:51:43
#include <bits/stdc++.h> using namespace std; bool f=false; int main() { int n,m; int h=0; int k; cin>>n>>m; for(int i=n;i<=m;i++) { k=i; while(k>=1) { h+=(k%10)*(k%10)*(k%10); k/=10; } if(h==k) { f=true; cout<<k<<" "; } h=0; } if(f==false) { cout<<"no"<<endl; } return 0; }