poj 2109 Power of Cryptography
来源:互联网 发布:淘宝装修要多少钱 编辑:程序博客网 时间:2024/06/12 06:47
Power of Cryptography
Time Limit: 1000MS Memory Limit: 30000KTotal Submissions: 18408 Accepted: 9292
很短有木有。。。。。。。
题目大意 给出两个数n,k
要你求个数ans ans^n=k
关于题目中的数据范围完全可以用double完爆 没必要用到二分+高精度
但是double类型虽然能表示10^(-307) ~ 10^308, (远大于题意的1<=p<10101这个范围),但只能精确前16位,因此必须慎用
那么为了避免double对输入的数在运算过程中进行精确,那么我们必须让double的运算第一步就得到一个int(即小数点尾数全为0)
#include<iostream>#include<cstdio>#include<cmath>using namespace std;int main(){ double n,m; while(cin>>n>>m) cout<<pow(m,1/n)<<endl; return 0;}
很短有木有。。。。。。。
2 0
- poj 2109 Power of Cryptography
- poj 2109 Power of Cryptography
- POJ 2109 Power of Cryptography
- poj 2109 : Power of Cryptography
- POJ 2109 Power of Cryptography
- poj 2109 Power of Cryptography
- poj 2109 Power of Cryptography
- POJ 2109 Power of Cryptography
- POJ 2109 Power of Cryptography
- POJ 2109 Power of Cryptography
- poj 2109 Power of Cryptography
- POJ 2109 Power of Cryptography
- POJ 2109 Power of Cryptography
- poj 2109 Power of Cryptography
- POJ 2109 Power of Cryptography
- poj-2109 Power of Cryptography
- POJ 2109 Power of Cryptography
- poj 2109 Power of Cryptography
- OCP 1Z0 053 169
- 黑马程序员_JAVA多线程_2
- 造个核弹有多难?
- API HOOK远程卸载方法
- VIM查找替换归纳总结
- poj 2109 Power of Cryptography
- 稀疏表达
- Foundation框架 —— NSArray
- Leetcode_Longest Substring Without Repeating Characters
- Java集合源码学习(4)_List接口
- Saruman's Army
- 设计模式学习笔记——备忘录模式
- Java 学习中遇到的问题 1.0
- hdu 1076 nightmare