刚开始看着道题时,感觉不用高精度好像就没法做,想了半天然后果断去看依然博客(这样确实不好),发现又用到了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. Oracle BFILE备忘

    创建目录 create or replace directory exp_dir as '/tmp'; 赋权 grant read, write on directory exp_dir to PUB ...

  2. Mysql 调用存储过程的两种方式

    一,使用call语句: 如:创建 call 调用: 使用占位符,通过prepare,execute调用:

  3. 内核中用于数据接收的结构体struct msghdr(转)

    内核中用于数据接收的结构体struct msghdr(转) 我们从一个实际的数据包发送的例子入手,来看看其发送的具体流程,以及过程中涉及到的相关数据结构.在我们的虚拟机上发送icmp回显请求包,pin ...

  4. sql boolean类型

    关于 MySQL 的 boolean 和 tinyint(1) boolean类型MYSQL保存BOOLEAN值时用1代表TRUE,0代表FALSE,boolean在MySQL里的类型为tinyint ...

  5. 10g 11g配置Logical Standby

    1.创建一个物理Standby数据库 详细见11g Physical Standby配置 2.Standby数据库取消managed  recovery ALTER DATABASE RECOVER ...

  6. Howto: Connect MySQL server using C program API under Linux or UNIX

    From my mailbag: How do I write a C program to connect MySQL database server? MySQL database does su ...

  7. hdu 4025 2011上海赛区网络赛E 压缩 ***

    直接T了,居然可以这么剪枝 题解链接:点我 #include<cstdio> #include<map> #include<cstring> #define ll ...

  8. DTMF的原理分析

    转自:http://blog.csdn.net/wangwenwen/article/details/8264925 1. DTMF原理 DTMF(Double Tone MulitiFrequenc ...

  9. windows phone SDK 8.0 模拟器异常 0x89721800解决办法

    删除 APPDATA\LOCAL\Microsoft\Phone Tools\CoreCon\10.0 从新启动即可!

  10. Java8中的default方法

    default方法 Java 8中引入了一个新的概念,叫做default方法,也可以称为Defender方法,或者虚拟扩展方法(Virtual extension methods). Default方 ...