UVA - 113 Power of Cryptography

原创 2016年08月30日 23:54:14

题目大意:求 p 开 n次方根

解题思路:百度了一下,用 double 恰好可以。

#include<cstdio>
#include<math.h>
int main () {
  double n, p ;
  while( scanf("%lf%lf",&n,&p) != EOF) {
     printf("%.0f\n",pow( p , 1/n ) );
  }
 return 0;
}

另一种方法是写两个数组来存,利用之前高精度乘法的知识查找。不过我不太会……

版权声明:本文为博主原创文章,未经博主允许不得转载。

uva 113 Power of Cryptography

Power of Cryptography       题目大意:k ^ n = q. 求n. 解题思路:double的上限是1.7e+308,完全够。   #include #include in...

UVa Problem 113 - Power of Cryptography

// UVa Problem 113 - Power of Cryptography // Verdict: Accepted // Submission Date: 2011-11-25 // UV...

UVa 113 / POJ 2109 Power of Cryptography (使用double处理大整数&泰勒公式与误差分析)

113 - Power of Cryptography Time limit: 3.000 seconds http://uva.onlinejudge.org/index.php?option=co...

Uva 113 Power of Cryptography

Power of Cryptography  Background Current work in cryptography involves (among other thi...

UVA 113 Power of Cryptography 解题报告

Power of Cryptography  Background Current work in cryptography involves (among other things) l...

UVA 113 - Power of Cryptography(数学)

大数开方,结果不超过整型范围。我用的高精和二分在POJ通过了,在UVA没通过。后来在网上看到有大牛直接用double过了,实在让人佩服啊。 我的代码: #include #include ...
  • zcube
  • zcube
  • 2013年01月26日 22:18
  • 2908

uva 113 - Power of Cryptography

Power of Cryptography  Background Current work in cryptography involves (among oth...

113 - Power of Cryptography

Power of Cryptography  Background Current work in cryptography involves (among other t...

UVa Power of Cryptography

Power of Cryptography  Background Current work in cryptography involves (among other things)...

POJ 2109 Power of Cryptography(二分+高精)

poj 2109 题目大意 求一个数k(0~10910^9)满足kn=pk^n=p,1
  • mmy1996
  • mmy1996
  • 2016年08月11日 23:02
  • 186
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:UVA - 113 Power of Cryptography
举报原因:
原因补充:

(最多只允许输入30个字)