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\n",pow(p,1/n)); 7 } 8 }
posted on 2013-07-18 12:01 Stomach_ache 阅读(137) 评论(0) 编辑 收藏 举报