对 p 开 n 次方 (数学推论)

#include<stdio.h>
#include<string.h>
#include<algorithm>
#include<math.h>
using namespace std;
int main()
{
    double n,p;
    while(scanf("%lf%lf",&n,&p)!=EOF)
        printf("%.0lf\n",pow(p,1.0/n));//求的是p开n次方
    return 0;
}
View Code

 

posted @ 2014-09-13 22:15  laiba2004  Views(110)  Comments(0Edit  收藏  举报