UVa 113

用double就可以了

Double(双精度浮点型)变量存储为 IEEE 64 位(8 个字节)浮点数值的形式,它的范围在负数的时候是从 -1.79769313486232E308 到 -4.94065645841247E-324,而正数的时候是从 4.94065645841247E-324 到 1.79769313486232E308(来自百度)

#include "stdio.h"
#include "math.h"

int main()
{
 double n,p;
 double temp;

 while(scanf("%lf%lf",&n,&p)==2)
 {
  temp=pow(p,1/n);

  printf("%.lf\n",temp);
 }

 return 0;
}

原文地址:https://www.cnblogs.com/Shirlies/p/2325939.html