#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 pow(int, long long);
int /*<<< orphan*/ printf(char *, long long);
int /*<<< orphan*/ scanf(char *, long long *);
int main() {
  long long int a, b = 1, i, d, k, j;
  scanf("%lld", &k);
  for (j = 0; j < k; j++) {
    scanf("%lld", &d);
    b = 1;
    for (i = 1; i < d; i++) {
      a = pow(2, i);
      b += a;
    }
    printf("%lld\n", b);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x1,-0x18(%rbp)
lea    0xeb2(%rip),%rdi
lea    -0x30(%rbp),%rsi
call   1040 <scanf@plt>
movq   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%rax
cmp    -0x30(%rbp),%rax
jge    11eb <main+0xbb>
lea    0xe8c(%rip),%rdi
lea    -0x28(%rbp),%rsi
call   1040 <scanf@plt>
movq   $0x1,-0x18(%rbp)
movq   $0x1,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
jge    11ca <main+0x9a>
mov    -0x20(%rbp),%rsi
mov    $0x2,%edi
call   1050 <pow@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    118d <main+0x5d>
mov    -0x18(%rbp),%rsi
lea    0xe30(%rip),%rdi
call   1030 <printf@plt>
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    115f <main+0x2f>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xebb(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1040 <scanf@plt>
cmpq   $0x0,0x8(%rsp)
jle    11cd <main+0x9d>
xor    %ebp,%ebp
lea    0xea0(%rip),%r14
lea    0x10(%rsp),%r15
lea    0xe99(%rip),%r12
jmp    1186 <main+0x56>
xchg   %ax,%ax
mov    %r12,%rdi
mov    %r13,%rsi
call   1030 <printf@plt>
add    $0x1,%rbp
cmp    0x8(%rsp),%rbp
jge    11cd <main+0x9d>
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
mov    $0x1,%r13d
cmpq   $0x2,0x10(%rsp)
jl     1170 <main+0x40>
mov    $0x1,%ebx
mov    $0x1,%r13d
nopw   0x0(%rax,%rax,1)
mov    $0x2,%edi
mov    %rbx,%rsi
call   1050 <pow@plt>
add    %rax,%r13
add    $0x1,%rbx
cmp    0x10(%rsp),%rbx
jl     11b0 <main+0x80>
jmp    1170 <main+0x40>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%lld\00"
@.str.1 = [6 x i8] c"%lld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i32 0, i32* %1
store i64 1, i64* %3
%8 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %6)
store i64 0, i64* %7
br label %9
9: ; preds = %31, %0
%10 = load i64, i64* %7
%11 = load i64, i64* %6
%12 = icmp slt i64 %10, %11
br i1 %12, label %13, label %34
13: ; preds = %9
%14 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %5)
store i64 1, i64* %3
store i64 1, i64* %4
br label %15
15: ; preds = %25, %13
%16 = load i64, i64* %4
%17 = load i64, i64* %5
%18 = icmp slt i64 %16, %17
br i1 %18, label %19, label %28
19: ; preds = %15
%20 = load i64, i64* %4
%21 = call i64 @pow(i32 2, i64 %20)
store i64 %21, i64* %2
%22 = load i64, i64* %2
%23 = load i64, i64* %3
%24 = add nsw i64 %23, %22
store i64 %24, i64* %3
br label %25
25: ; preds = %19
%26 = load i64, i64* %4
%27 = add nsw i64 %26, 1
store i64 %27, i64* %4
br label %15
28: ; preds = %15
%29 = load i64, i64* %3
%30 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %29)
br label %31
31: ; preds = %28
%32 = load i64, i64* %7
%33 = add nsw i64 %32, 1
store i64 %33, i64* %7
br label %9
34: ; preds = %9
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%lld\00"
@.str.1 = [6 x i8] c"%lld\0A\00"
define i32 @main() {
%1 = alloca i64
%2 = alloca i64
%3 = bitcast i64* %1 to i8*
%4 = bitcast i64* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %2)
%6 = load i64, i64* %2
%7 = icmp sgt i64 %6, 0
br i1 %7, label %8, label %27
8: ; preds = %0, %21
%9 = phi i64 [ %24, %21 ], [ 0, %0 ]
%10 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %1)
%11 = load i64, i64* %1
%12 = icmp sgt i64 %11, 1
br i1 %12, label %13, label %21
13: ; preds = %8, %13
%14 = phi i64 [ %18, %13 ], [ 1, %8 ]
%15 = phi i64 [ %17, %13 ], [ 1, %8 ]
%16 = call i64 @pow(i32 2, i64 %14)
%17 = add nsw i64 %16, %15
%18 = add nuw nsw i64 %14, 1
%19 = load i64, i64* %1
%20 = icmp slt i64 %18, %19
br i1 %20, label %13, label %21
21: ; preds = %13, %8
%22 = phi i64 [ 1, %8 ], [ %17, %13 ]
%23 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %22)
%24 = add nuw nsw i64 %9, 1
%25 = load i64, i64* %2
%26 = icmp slt i64 %24, %25
br i1 %26, label %8, label %27
27: ; preds = %21, %0
ret i32 0
}