(double) 存储的整数范围在(pm 307) 范围内,小数部分的精确度只有前(16) 位 ,这题(n,p) 的范围都在(double) 里面
#include <iostream>
#include <algorithm>
#include <cstring>
#include <vector>
#include <cmath>
using namespace std;
int main() {
double n,p;
while(cin >> n >> p) {
cout << pow(p,1.0 / n) << endl;
}
return 0;
}
参考