刚开始看着道题时,感觉不用高精度好像就没法做,想了半天然后果断去看依然博客(这样确实不好),发现又用到了double(这个可以放“+” “-” 300多位的家伙!!!)

#include <iostream>
#include <cmath>
using namespace std; int main()
{
double p, q;
while(cin >> p >> q)
{
cout << pow(q, 1.0/p) << endl;
}
return 0;
}

poj2109的更多相关文章

  1. [POJ2109]Power of Cryptography

    [POJ2109]Power of Cryptography 试题描述 Current work in cryptography involves (among other things) large ...

  2. POJ-2109 Power of Cryptography(数学或二分+高精度)

    题目链接: https://vjudge.net/problem/POJ-2109 题目大意: 有指数函数 k^n = p , 其中k.n.p均为整数且 1<=k<=10^9 , 1< ...

  3. POJ2109——Power of Cryptography

    Power of Cryptography DescriptionCurrent work in cryptography involves (among other things) large pr ...

  4. poj2109 【贪心】

    Current work in cryptography involves (among other things) large prime numbers and computing powers ...

  5. 高精度水题(POJ2109)

    题目链接:http://poj.org/problem?id=2109 double 可以虽然可以表示10^-307~~~10^208,但是精确度只有16位,这个题有bug. #include < ...

  6. Poj2109 (2) k^n = p.

    二分法,由p最大值最小值的中间值开始猜k,通过比较pow(k,n)与p的大小来进一步精确k,直到找到. #include<stdio.h> #include<math.h> # ...

  7. Poj2109 (1) k^n = p.

    看到1<=p<10101 ,就去想大数操作了,后来看了discuss原来double完全可以放. 类型          长度 (bit)           有效数字          ...

  8. poj题目

    poj2965 poj1753:标准的BFS+位运算优化 poj1328:线段覆盖变种,把圆对应到线段上,贪心求解 poj2109:高精度开根,二分+高精度,注意要判断答案的位数,如果按照题目给的范围 ...

  9. poj分类 很好很有层次感。

    初期: 一.基本算法:      (1)枚举. (poj1753,poj2965)      (2)贪心(poj1328,poj2109,poj2586)      (3)递归和分治法.      ( ...

随机推荐

  1. java删除被占用的文件

    boolean result = f.delete();//判断是否删除完毕 if(!result) { System.gc();//系统进行资源强制回收 f.delete; }

  2. EasyUI中控件汉化问题

    --BY ZYZ 我在使用EasyUI的过程中,遇到了控件无汉化的情况,如下图. 这么多洋文看着觉得挺烦的.时间居然是月日年格式的,这样可不行,得改. 重写控件代码?别,那能是我这种低级代码C-V客能 ...

  3. 直接放个DB2 SQL STATEMENT大全好了!

    SQL statements   This topic contains tables that list the SQL statements classified by type. SQL sch ...

  4. MVC – 8.Razor 布局

    8.1.@RenderBody() 8.2.多个"占位符":@RenderSection() 8.3.js合并 @Scripts.Render("~/bundles/js ...

  5. SVN的忽略和只读使用方法学习记录

    前言,先扯几句.最近学了GIT,虽然很肤浅,但是也算是用上了分布式版本管理控制系统.Linus很牛,他也很厌烦SVN,而我看这些都是工具,是否拿来使用主要看是否顺手.我赞同分布式版本管理控制,它有诸多 ...

  6. 安装oracle 12c RAC遇到的一些问题

    (1) 安装grid软件,停止在38%很长时间不动,日志显示正常   解决方法: 由于是虚拟机安装,设置的内存为600M,关闭虚拟机,把内存调成1GB,问题解决~在38%Linking RMAN Ut ...

  7. annotation-config 和 component-scan 的区别

    <context:annotation-config> 和 <context:component-scan>是Spring Core里面的两个基础概念,每个使用者都有必要理解怎 ...

  8. Win10 UAP 绑定

    Compiled DataBinding in Windows Universal Applications (UAP) http://nicksnettravels.builttoroam.com/ ...

  9. RTP 与RTCP 解释. 含同步时间戳

    转自:http://blog.csdn.net/wudebao5220150/article/details/13816225 RTP协议是real-time transport protocol的缩 ...

  10. Web分布式架构演变过程

    1 单台服务器 2 应用服务器与数据库服务器 文件服务器分开 3 数据库 缓存  读写分离  实时写 非实时写 4 应用服务器集群  需要再配一台”负载均衡调度器“,nginx 5 数据库拆封 主库 ...