POJ 2109 Power of Cryptography 开根

题意:给定n, p, 求pow(p, 1/n)

 

10955211 NY_lv10 2109 Accepted 196K 0MS C++ 192B 2012-10-25 18:56:50

 

View Code
#include <iostream>
#include <math.h>
using namespace std;

int main()
{
    double n, p;
    while (scanf("%lf %lf", &n, &p) !=EOF)
    {
        printf("%0.0lf\n", pow(p, 1/n));
    }
    return 0;
}

 

 

posted @ 2012-10-25 18:59  旅行的蜗牛  阅读(181)  评论(0编辑  收藏  举报