POJ 2109 Power of Cryptography

float 32 6~7 10^(-37) ~  10^38
double 64 15~16 10^(-307)   ~   10^308

long double 128 18~19 10^(-4931)  ~  10 ^ 4932

#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
int main()
{
    double n,p;
    while (scanf("%lf%lf",&n,&p) != EOF)
    {
        printf("%.0f\n",pow(p,1.0/n));
    }
}

你可能感兴趣的:(POJ 2109 Power of Cryptography)