看到1<=p<10101 我就去想大数操作了,后来看了discuss原来double完全可以放。
类型 长度 (bit) 有效数字 绝对值范围
float 32 6~7 10^(-37) ~ 10^38
double 64 15~16 10^(-307) ~10^308
long double 128 18~19 10^(-4931) ~ 10 ^ 4932
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
double n,m;
while(cin>>n>>m)
{
cout<<pow(m,1/n)<<endl;
}
return 0;
}
2344

被折叠的 条评论
为什么被折叠?



