poj 3100 && zoj 2818 ( Root of the Problem ) (睡前一水)

网友投稿 561 2022-10-13

poj 3100 && zoj 2818 ( Root of the Problem ) (睡前一水)

poj 3100 && zoj 2818 ( Root of the Problem ) (睡前一水)

链接:​​click here​​

题意:

Given positive integers B and N, find an integer A such that AN is as close as possible to B. (The result A is an approximation to the Nth root of B.) Note that AN may be less than, equal to, or greater than B.

.给你B和N,求个整数A使得A^n最接近B

不解释,代码

//zoj 2818 poj 3100#include #include #include #include #include using namespace std;int main(){ double b,n; while(cin>>b>>n&&b&&n) { int a=(int )pow(b,1/n); //cout<

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:radian- AngularJS 框架(radiant regenerating essence)
下一篇:错排公式略解
相关文章

 发表评论

暂时没有评论,来抢沙发吧~