#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 */
long long log10(double);
double pow(int, double);
int /*<<< orphan*/ printf(char *, double);
int scanf(char *, long long *, double *);
main() {
  long long x;
  long long m;
  double y;
  while (scanf("%lld%lf", &x, &y) == 2) {
    y = log10(y) / x;
    y = pow(10, y);
    printf("%.0lf\n", y);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x20(%rbp),%rdx
call   1040 <scanf@plt>
cmp    $0x2,%eax
jne    11b0 <main+0x70>
movsd  -0x20(%rbp),%xmm0
call   1060 <log10@plt>
cqto
idivq  -0x10(%rbp)
cvtsi2sd %rax,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
mov    $0xa,%edi
call   1050 <pow@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
lea    0xe62(%rip),%rdi
call   1030 <printf@plt>
jmp    114f <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    0xeae(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <scanf@plt>
cmp    $0x2,%eax
jne    11e0 <main+0xa0>
lea    0xe9b(%rip),%r14
lea    0xe8c(%rip),%r15
lea    0x10(%rsp),%r12
lea    0x8(%rsp),%rbx
jmp    11be <main+0x7e>
cqto
idiv   %rcx
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  %xmm0,0x8(%rsp)
mov    $0xa,%edi
call   1050 <pow@plt>
movsd  %xmm0,0x8(%rsp)
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
call   1040 <scanf@plt>
cmp    $0x2,%eax
jne    11e0 <main+0xa0>
movsd  0x8(%rsp),%xmm0
call   1060 <log10@plt>
mov    0x10(%rsp),%rcx
mov    %rax,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
jne    1180 <main+0x40>
xor    %edx,%edx
div    %ecx
jmp    1185 <main+0x45>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

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