poj2109

题目链接: http://poj.org/problem?id=2109

代码很简单,但是还是学到了东西。。

类型             长度 (bit)            有效数字                    绝对值范围
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

AC代码:

1 #include<stdio.h>
2 #include<math.h>
3 int main(){
4     double n,p;
5     while(~scanf("%lf%lf",&n,&p)){
6         printf("%.0lf
",pow(p,1/n));
7     }
8 }


原文地址:https://www.cnblogs.com/Stomach-ache/p/3703227.html