直接上代码

#include <iostream>
#include <cmath>
using namespace std;
typedef long long LL;

int main() {
    LL a = 625;
    LL s = pow(a,1.0/4);
    cout<<"pow开方:"<<s<<endl; 
    return 0;
}

说明一下:

  • pow中的第二个参数必须是1.0 / N,或者 1 / N.0的结构,1/4这样的都是整数,开平方开不出来。
    在这里插入图片描述