#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 */
scalar_t__ EOF;
int /*<<< orphan*/ log(int /*<<< orphan*/);
int /*<<< orphan*/ pow(double, int);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
scalar_t__ scanf(char *, double *, double *);
int main() {
  double n, p;
  printf("%.lf\n", log(pow(10, 101)));
  while (scanf("%lf%lf", &n, &p) != EOF) {
    printf("%.0lf\n", pow(p, 1 / n));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xea9(%rip),%xmm0
mov    $0x65,%edi
call   1060 <pow@plt>
mov    %eax,%edi
call   1050 <log@plt>
mov    %eax,%esi
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
lea    0xe99(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <scanf@plt>
mov    0x2e57(%rip),%rcx
cmp    (%rcx),%rax
je     11c8 <main+0x88>
movsd  -0x18(%rbp),%xmm0
movsd  0xe61(%rip),%xmm1
divsd  -0x10(%rbp),%xmm1
cvttsd2si %xmm1,%edi
call   1060 <pow@plt>
mov    %eax,%esi
lea    0xe5f(%rip),%rdi
call   1030 <printf@plt>
jmp    1176 <main+0x36>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
movsd  0xeab(%rip),%xmm0
mov    $0x65,%edi
call   1060 <pow@plt>
mov    %eax,%edi
call   1050 <log@plt>
lea    0xea3(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
lea    0xe9b(%rip),%rdi
lea    0x8(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x2e59(%rip),%r13
cmp    0x0(%r13),%rax
je     11ea <main+0xaa>
lea    0xe81(%rip),%r14
lea    0xe73(%rip),%r15
lea    0x8(%rsp),%r12
mov    %rsp,%rbx
nopl   0x0(%rax,%rax,1)
movsd  (%rsp),%xmm0
movsd  0xe4b(%rip),%xmm1
divsd  0x8(%rsp),%xmm1
cvttsd2si %xmm1,%edi
call   1060 <pow@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
call   1040 <scanf@plt>
cmp    0x0(%r13),%rax
jne    11b0 <main+0x70>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

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

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