pow() 函数用来求 x 的 y 次幂(次方),其原型为:

 1 double pow(double x, double y);
 2 
 3 #include<iostream>
 4 #include<cmath>
 5 using namespace std;
 6 double n,p;
 7 int main(){
 8 while(cin>>n>>p){
 9 cout<<pow(p,1.0/n)<<endl;
10 }
11 return 0;
12 }

 

相关文章:

  • 2021-10-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-06
  • 2021-07-05
猜你喜欢
  • 2022-12-23
  • 2021-07-12
  • 2021-10-24
  • 2022-12-23
  • 2021-04-20
  • 2022-12-23
  • 2021-10-08
相关资源
相似解决方案