Run ID:109083

提交时间:2025-01-25 19:55:42

#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; } //cout<<i<<" "<<h<<endl; if(h==i) { f=true; cout<<h<<" "; } h=0; } if(f==false) { cout<<"no"<<endl; } return 0; }