http://poj.org/problem?id=2109
ans^n = p。
给出n,p。求ans。
#include <iostream> #include <cmath> using namespace std; int main() { double n, p; while(cin>>n>>p) { cout<<pow(p, 1.0/n)<<endl; } return 0; }
http://poj.org/problem?id=2109
ans^n = p。
给出n,p。求ans。
#include <iostream> #include <cmath> using namespace std; int main() { double n, p; while(cin>>n>>p) { cout<<pow(p, 1.0/n)<<endl; } return 0; }