版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/L1558198727/article/details/85091434
就是sqrt(sqrt(sqrt(……)))一共b个sqrt吧。
等价变换
e 取15位 双精度最大值
2.718281828459045
#include <iostream>
#include <stdio.h>
#include <math.h>
using namespace std;
int main()
{
int a,b;
double ret;
scanf("%d%d",&a,&b);
ret = (double)a;
ret = log(ret)/(pow(2,b));
ret = pow(2.718281828459045,ret);
printf("%.2f\n",ret);
return 0;
}