Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
变换公式后注意精度就很简单了http://blog.csdn.net/luckcircle/article/details/54808678 欢迎访问博客交流~ #include<iostream> #include<cstdio> #include<cmath> using namespace std; int main(){ double n,p,k; while(scanf("%lf %lf",&n,&p)!=EOF){ k=(double)pow(p,1.0/n); printf("%.0lf\n",k); } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator