#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(double (A), double(N)) < pow (double(A+1), double(N)) - B)
cout << A << endl;
else
cout << A + 1 << endl;
}
}
zoj 2818 Root of the Problem
最新推荐文章于 2020-06-12 21:55:45 发布