#include <iostream>
#include <cmath>
using namespace std;

int main()
{
 double B, N;
 while(cin>>B>>N&&B&&N)
 {
  int A=0;
  A=pow(double (B),double(1/N));
  if((B-pow(A,N))<(pow(A+1,N)-B))
   cout<<A<<endl;
  else
   cout<<A+1<<endl;

 }
 return 0;
}

posted on 2012-05-22 12:20  梨子  阅读(95)  评论(0)    收藏  举报