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

double 可以虽然可以表示10^-307~~~10^208,但是精确度只有16位,这个题有bug。

#include <stdio.h>
#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));
}
return ;
}

高精度水题(POJ2109)的更多相关文章

  1. uva 748 Exponentiation 浮点数乘方运算 高精度水题

    输入的前六位数表示一个小数,然后输入一个数表示几次方.要求用高精度算出结果. 高精度水题,主要注意处理小数点,先在输入时把小数点提取出来并记录位置,用普通乘法计算出结果后由后向前计算位置添加小数点. ...

  2. POJ 水题(刷题)进阶

    转载请注明出处:優YoU http://blog.csdn.net/lyy289065406/article/details/6642573 部分解题报告添加新内容,除了原有的"大致题意&q ...

  3. 【转】POJ百道水题列表

    以下是poj百道水题,新手可以考虑从这里刷起 搜索1002 Fire Net1004 Anagrams by Stack1005 Jugs1008 Gnome Tetravex1091 Knight ...

  4. 每日一刷(2018多校水题+2016icpc水题)

    11.9 线段树 http://acm.hdu.edu.cn/showproblem.php?pid=6315 求逆序对个数 http://acm.hdu.edu.cn/showproblem.php ...

  5. HDOJ 2317. Nasty Hacks 模拟水题

    Nasty Hacks Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Tota ...

  6. ACM :漫漫上学路 -DP -水题

    CSU 1772 漫漫上学路 Time Limit: 1000MS   Memory Limit: 131072KB   64bit IO Format: %lld & %llu Submit ...

  7. ytu 1050:写一个函数,使给定的一个二维数组(3×3)转置,即行列互换(水题)

    1050: 写一个函数,使给定的一个二维数组(3×3)转置,即行列互换 Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 154  Solved: 112[ ...

  8. [poj2247] Humble Numbers (DP水题)

    DP 水题 Description A number whose only prime factors are 2,3,5 or 7 is called a humble number. The se ...

  9. gdutcode 1195: 相信我这是水题 GDUT中有个风云人物pigofzhou,是冰点奇迹队的主代码手,

    1195: 相信我这是水题 Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 821  Solved: 219 Description GDUT中有个风云人 ...

随机推荐

  1. Jenkins 第一次访问时提示Unlock Jenkins

    Jenkins启动后录入网址提示Unlock Jenkins,To ensure Jenkins is securely set up by the administrator Jenkins启动后, ...

  2. python3 sorted()函数笔记

    import randoma=[]for i in range(9): b=random.randint(0,9)#生产9个随机数 a.append(b)#把生成的随机数添加到列表里面print(so ...

  3. Yiic执行php脚本

    用 Yii 写一个脚本,在 Linux 上运行这个脚本 1.编写好 XXXXCommand 继承 CConsoleCommand <?php namespace base\console; cl ...

  4. Approximate timing for various operations on a typical PC

    execute typical instruction 1/1,000,000,000 sec = 1 nanosec fetch from L1 cache memory 0.5 nanosec b ...

  5. Numpy的那些事儿

    2 NumPy-快速处理数据 标准安装的Python中用列表(list)保存一组值,可以用来当作数组使用,不过由于列表的元素可以是任何对象,因此列表中所保存的是对象的指针.这样为了保存一个简单的[1, ...

  6. Cloudera Manager卸载笔记

    1.通过管理平台分别停止组件服务和Cloudera Management Service 2.通过管理平台注销并移除Parcles (在控制台注销并移除,无论是安装的Parcles还是未安装的Parc ...

  7. Hibernate课程 初探一对多映射3-3 单向多对一的测试

    public static void testManyToOne(){ Student stu1 = new Student("小明","男"); Studen ...

  8. Http和Https的区别--笔记

    学习链接: 知乎:https://www.zhihu.com/question/19577317 法号桑菜 http://blog.csdn.net/jasonjwl/article/details/ ...

  9. The ninth day

    a good egg 可不是好的鸡蛋的意思哦 它等同于 a good person 大好人的意思 eg: We all think he is a good egg. 我们都认为他是一个好人. I t ...

  10. unity工具介绍

    MemoryProfiler内存分析工具 行为树 behaviac github 场景动画编辑器 Snapdragon Profiler性能分析工具 VTune性能分析器 protobuf数据交换格式 ...