标签:break log code nbsp while using image ges 51nod
#include <cmath> #include "iostream" using namespace std; int main() { int m; int a[10]={0}; cin>>m; for(int i=m;;i++){ int n=i,len=0,sum=0; while(n!=0) { len++; a[len]=n%10; n=n/10; } for(int j=1;j<=len;j++){ sum+=pow(a[j],len); } if(sum==i){ cout<<sum<<endl; break; } } return 0; }
标签:break log code nbsp while using image ges 51nod
原文地址:http://www.cnblogs.com/kimsimple/p/7460923.html