#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double pow(double, double);
int /*<<< orphan*/ printf(char *, double);
int scanf(char *, int *, double *);
int main() {
  int n;
  double p, k;
  while (scanf("%d %lf", &n, &p) == 2) {
    k = pow(p, 1.0 / n);
    printf("%.0lf\n", k);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec2(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1040 <scanf@plt>
cmp    $0x2,%eax
jne    1192 <main+0x62>
movsd  -0x10(%rbp),%xmm0
cvtsi2sdl -0x8(%rbp),%xmm2
movsd  0xe92(%rip),%xmm1
divsd  %xmm2,%xmm1
call   1050 <pow@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xe87(%rip),%rdi
call   1030 <printf@plt>
jmp    113f <main+0xf>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xec6(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x10(%rsp),%rdx
call   1040 <scanf@plt>
cmp    $0x2,%eax
jne    11ab <main+0x7b>
lea    0xeb2(%rip),%r14
lea    0xea4(%rip),%r15
lea    0xc(%rsp),%r12
lea    0x10(%rsp),%rbx
xchg   %ax,%ax
movsd  0x10(%rsp),%xmm0
xorps  %xmm2,%xmm2
cvtsi2sdl 0xc(%rsp),%xmm2
movsd  0xe79(%rip),%xmm1
divsd  %xmm2,%xmm1
call   1050 <pow@plt>
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
call   1040 <scanf@plt>
cmp    $0x2,%eax
je     1170 <main+0x40>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%d %lf\00"
@.str.1 = [7 x i8] c"%.0lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
%4 = alloca double
store i32 0, i32* %1
br label %5
5: ; preds = %8, %0
%6 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %2, double* %3)
%7 = icmp eq i32 %6, 2
br i1 %7, label %8, label %16
8: ; preds = %5
%9 = load double, double* %3
%10 = load i32, i32* %2
%11 = sitofp i32 %10 to double
%12 = fdiv double 1.000000e+00, %11
%13 = call double @pow(double %9, double %12)
store double %13, double* %4
%14 = load double, double* %4
%15 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %14)
br label %5
16: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d %lf\00"
@.str.1 = [7 x i8] c"%.0lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = bitcast i32* %1 to i8*
%4 = bitcast double* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %1, double* %2)
%6 = icmp eq i32 %5, 2
br i1 %6, label %7, label %16
7: ; preds = %0, %7
%8 = load double, double* %2
%9 = load i32, i32* %1
%10 = sitofp i32 %9 to double
%11 = fdiv double 1.000000e+00, %10
%12 = call double @pow(double %8, double %11)
%13 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %12)
%14 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %1, double* %2)
%15 = icmp eq i32 %14, 2
br i1 %15, label %7, label %16
16: ; preds = %7, %0
ret i32 0
}