n^k=p

 avatar
user_3763047219
c_cpp
2 years ago
292 B
1
Indexable
Never
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include<math.h>
#define e 2.718281828459

int main()
{
    double n, p;

    scanf("%lf%lf", &n, &p);
    printf("%d", (int)(pow(e, log(p) / n) + 0.5));
    //pow(x,y):y是x的幾次方
}
//while(scanf("%lf%lf",&n ,&p) != EOF)