求中間數
pow() 函數用來求 x 的 y 次冪(次方)
double pow(double x, double y);
#include<iostream>
#include<math.h>using namespace std;
int main()
{
double n,p,k;
while(cin>>n>>p)
{cout<<(int)(pow(p,1/n) + 0.5)<<endl;}
return 0;
}
求中間數
pow() 函數用來求 x 的 y 次冪(次方)
double pow(double x, double y);
#include<iostream>
#include<math.h>