poj 2109(水题,用double就能过)
#include<iostream> #include<cmath> using namespace std; int main(){ double n,p,k; while(scanf("%lf%lf",&n,&p)==2){ k = pow(p,1.0/n); printf("%.0lf\n",k); } return 0; }
#include<iostream> #include<cmath> using namespace std; int main(){ double n,p,k; while(scanf("%lf%lf",&n,&p)==2){ k = pow(p,1.0/n); printf("%.0lf\n",k); } return 0; }