poj 2109(水题)
#include<iostream> #include<cmath> #include<cstdio> #include<cstring> using namespace std; #define ld long double int main(){ double n,p; while(scanf("%lf%lf",&n,&p)!=EOF){ printf("%.0lf\n",pow((double)p,(double)1.0/n)); } return 0; }
#include<iostream> #include<cmath> #include<cstdio> #include<cstring> using namespace std; #define ld long double int main(){ double n,p; while(scanf("%lf%lf",&n,&p)!=EOF){ printf("%.0lf\n",pow((double)p,(double)1.0/n)); } return 0; }