pow() 函数用来求 x 的 y 次幂(次方),其原型为: double pow(double x, double y); #include<iostream> #include<cmath> using namespace std; double n,p; int main(){ while(cin>>n>>p){ cout<<pow(p,1.0/n)<<endl; } return ; }