#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 */
int /*<<< orphan*/ printf(char *, long, long);
int /*<<< orphan*/ scanf(char *, long *);
main() {
  long fac[15], der[15], j, f = 1, n, t;
  fac[0] = 1;
  fac[1] = 1;
  for (j = 2; j <= 13; j++) {
    f *= j;
    fac[j] = f;
  }
  der[1] = 0;
  der[2] = 1;
  for (j = 3; j <= 13; j++) {
    der[j] = (j - 1) * (der[j - 1] + der[j - 2]);
  }
  scanf("%ld", &t);
  while (t--) {
    scanf("%ld", &n);
    printf("%ld/%ld\n", der[n], fac[n]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x1,-0x110(%rbp)
movq   $0x1,-0x80(%rbp)
movq   $0x1,-0x78(%rbp)
movq   $0x2,-0x108(%rbp)
cmpq   $0xd,-0x108(%rbp)
0d
jg     11a6 <main+0x86>
mov    -0x108(%rbp),%rax
imul   -0x110(%rbp),%rax
ff
mov    %rax,-0x110(%rbp)
mov    -0x110(%rbp),%rcx
mov    -0x108(%rbp),%rax
mov    %rcx,-0x80(%rbp,%rax,8)
mov    -0x108(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x108(%rbp)
jmp    1158 <main+0x38>
movq   $0x0,-0xf8(%rbp)
movq   $0x1,-0xf0(%rbp)
movq   $0x3,-0x108(%rbp)
cmpq   $0xd,-0x108(%rbp)
0d
jg     1230 <main+0x110>
mov    -0x108(%rbp),%rcx
sub    $0x1,%rcx
mov    -0x108(%rbp),%rax
sub    $0x1,%rax
mov    -0x100(%rbp,%rax,8),%rax
ff
mov    -0x108(%rbp),%rdx
sub    $0x2,%rdx
add    -0x100(%rbp,%rdx,8),%rax
ff
imul   %rax,%rcx
mov    -0x108(%rbp),%rax
mov    %rcx,-0x100(%rbp,%rax,8)
ff
mov    -0x108(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x108(%rbp)
jmp    11c7 <main+0xa7>
lea    0xdc9(%rip),%rdi
lea    -0x120(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x120(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x120(%rbp)
cmp    $0x0,%rax
je     12a1 <main+0x181>
lea    0xd97(%rip),%rdi
lea    -0x118(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x118(%rbp),%rax
mov    -0x100(%rbp,%rax,8),%rsi
ff
mov    -0x118(%rbp),%rax
mov    -0x80(%rbp,%rax,8),%rdx
lea    0xd6d(%rip),%rdi
call   1030 <printf@plt>
jmp    1243 <main+0x123>
xor    %eax,%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x110,%rsp
movaps 0xecd(%rip),%xmm0
movaps %xmm0,0x90(%rsp)
movaps 0xece(%rip),%xmm0
movaps %xmm0,0xa0(%rsp)
movaps 0xecf(%rip),%xmm0
movaps %xmm0,0xb0(%rsp)
movaps 0xed0(%rip),%xmm0
movaps %xmm0,0xc0(%rsp)
movaps 0xed1(%rip),%xmm0
movaps %xmm0,0xd0(%rsp)
movaps 0xed2(%rip),%xmm0
movaps %xmm0,0xe0(%rsp)
movaps 0xed3(%rip),%xmm0
movaps %xmm0,0xf0(%rsp)
movaps 0xed4(%rip),%xmm0
movups %xmm0,0x18(%rsp)
movaps 0xed8(%rip),%xmm0
movups %xmm0,0x28(%rsp)
movaps 0xedc(%rip),%xmm0
movups %xmm0,0x38(%rsp)
movaps 0xee0(%rip),%xmm0
movups %xmm0,0x48(%rsp)
movaps 0xee4(%rip),%xmm0
movups %xmm0,0x58(%rsp)
movaps 0xee8(%rip),%xmm0
movups %xmm0,0x68(%rsp)
mov    $0x888ab9e4,%eax
mov    %rax,0x78(%rsp)
lea    0xee2(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
subq   $0x1,(%rsp)
jb     123c <main+0x11c>
lea    0xecc(%rip),%r14
lea    0x8(%rsp),%r15
lea    0xec4(%rip),%rbx
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
mov    0x8(%rsp),%rax
mov    0x10(%rsp,%rax,8),%rsi
mov    0x90(%rsp,%rax,8),%rdx
mov    %rbx,%rdi
call   1030 <printf@plt>
subq   $0x1,(%rsp)
jae    1210 <main+0xf0>
xor    %eax,%eax
add    $0x110,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%ld\00"
@.str.1 = [9 x i8] c"%ld/%ld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [15 x i64]
%3 = alloca [15 x i64]
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i32 0, i32* %1
store i64 1, i64* %5
%8 = getelementptr inbounds [15 x i64], [15 x i64]* %2, i64 0, i64 0
store i64 1, i64* %8
%9 = getelementptr inbounds [15 x i64], [15 x i64]* %2, i64 0, i64 1
store i64 1, i64* %9
store i64 2, i64* %4
br label %10
10: ; preds = %20, %0
%11 = load i64, i64* %4
%12 = icmp sle i64 %11, 13
br i1 %12, label %13, label %23
13: ; preds = %10
%14 = load i64, i64* %4
%15 = load i64, i64* %5
%16 = mul nsw i64 %15, %14
store i64 %16, i64* %5
%17 = load i64, i64* %5
%18 = load i64, i64* %4
%19 = getelementptr inbounds [15 x i64], [15 x i64]* %2, i64 0, i64 %18
store i64 %17, i64* %19
br label %20
20: ; preds = %13
%21 = load i64, i64* %4
%22 = add nsw i64 %21, 1
store i64 %22, i64* %4
br label %10
23: ; preds = %10
%24 = getelementptr inbounds [15 x i64], [15 x i64]* %3, i64 0, i64 1
store i64 0, i64* %24
%25 = getelementptr inbounds [15 x i64], [15 x i64]* %3, i64 0, i64 2
store i64 1, i64* %25
store i64 3, i64* %4
br label %26
26: ; preds = %44, %23
%27 = load i64, i64* %4
%28 = icmp sle i64 %27, 13
br i1 %28, label %29, label %47
29: ; preds = %26
%30 = load i64, i64* %4
%31 = sub nsw i64 %30, 1
%32 = load i64, i64* %4
%33 = sub nsw i64 %32, 1
%34 = getelementptr inbounds [15 x i64], [15 x i64]* %3, i64 0, i64 %33
%35 = load i64, i64* %34
%36 = load i64, i64* %4
%37 = sub nsw i64 %36, 2
%38 = getelementptr inbounds [15 x i64], [15 x i64]* %3, i64 0, i64 %37
%39 = load i64, i64* %38
%40 = add nsw i64 %35, %39
%41 = mul nsw i64 %31, %40
%42 = load i64, i64* %4
%43 = getelementptr inbounds [15 x i64], [15 x i64]* %3, i64 0, i64 %42
store i64 %41, i64* %43
br label %44
44: ; preds = %29
%45 = load i64, i64* %4
%46 = add nsw i64 %45, 1
store i64 %46, i64* %4
br label %26
47: ; preds = %26
%48 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %7)
br label %49
49: ; preds = %53, %47
%50 = load i64, i64* %7
%51 = add nsw i64 %50, -1
store i64 %51, i64* %7
%52 = icmp ne i64 %50, 0
br i1 %52, label %53, label %62
53: ; preds = %49
%54 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %6)
%55 = load i64, i64* %6
%56 = getelementptr inbounds [15 x i64], [15 x i64]* %3, i64 0, i64 %55
%57 = load i64, i64* %56
%58 = load i64, i64* %6
%59 = getelementptr inbounds [15 x i64], [15 x i64]* %2, i64 0, i64 %58
%60 = load i64, i64* %59
%61 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i64 %57, i64 %60)
br label %49
62: ; preds = %49
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%ld\00"
@.str.1 = [9 x i8] c"%ld/%ld\0A\00"
define i32 @main() {
%1 = alloca [15 x i64]
%2 = alloca [15 x i64]
%3 = alloca i64
%4 = alloca i64
%5 = bitcast [15 x i64]* %1 to i8*
%6 = bitcast [15 x i64]* %2 to i8*
%7 = bitcast i64* %3 to i8*
%8 = bitcast i64* %4 to i8*
%9 = bitcast [15 x i64]* %1 to <2 x i64>*
store <2 x i64> <i64 1, i64 1>, <2 x i64>* %9
%10 = getelementptr inbounds [15 x i64], [15 x i64]* %1, i64 0, i64 2
%11 = bitcast i64* %10 to <2 x i64>*
store <2 x i64> <i64 2, i64 6>, <2 x i64>* %11
%12 = getelementptr inbounds [15 x i64], [15 x i64]* %1, i64 0, i64 4
%13 = bitcast i64* %12 to <2 x i64>*
store <2 x i64> <i64 24, i64 120>, <2 x i64>* %13
%14 = getelementptr inbounds [15 x i64], [15 x i64]* %1, i64 0, i64 6
%15 = bitcast i64* %14 to <2 x i64>*
store <2 x i64> <i64 720, i64 5040>, <2 x i64>* %15
%16 = getelementptr inbounds [15 x i64], [15 x i64]* %1, i64 0, i64 8
%17 = bitcast i64* %16 to <2 x i64>*
store <2 x i64> <i64 40320, i64 362880>, <2 x i64>* %17
%18 = getelementptr inbounds [15 x i64], [15 x i64]* %1, i64 0, i64 10
%19 = bitcast i64* %18 to <2 x i64>*
store <2 x i64> <i64 3628800, i64 39916800>, <2 x i64>* %19
%20 = getelementptr inbounds [15 x i64], [15 x i64]* %1, i64 0, i64 12
%21 = bitcast i64* %20 to <2 x i64>*
store <2 x i64> <i64 479001600, i64 6227020800>, <2 x i64>* %21
%22 = getelementptr inbounds [15 x i64], [15 x i64]* %2, i64 0, i64 1
%23 = bitcast i64* %22 to <2 x i64>*
store <2 x i64> <i64 0, i64 1>, <2 x i64>* %23
%24 = getelementptr inbounds [15 x i64], [15 x i64]* %2, i64 0, i64 3
%25 = bitcast i64* %24 to <2 x i64>*
store <2 x i64> <i64 2, i64 9>, <2 x i64>* %25
%26 = getelementptr inbounds [15 x i64], [15 x i64]* %2, i64 0, i64 5
%27 = bitcast i64* %26 to <2 x i64>*
store <2 x i64> <i64 44, i64 265>, <2 x i64>* %27
%28 = getelementptr inbounds [15 x i64], [15 x i64]* %2, i64 0, i64 7
%29 = bitcast i64* %28 to <2 x i64>*
store <2 x i64> <i64 1854, i64 14833>, <2 x i64>* %29
%30 = getelementptr inbounds [15 x i64], [15 x i64]* %2, i64 0, i64 9
%31 = bitcast i64* %30 to <2 x i64>*
store <2 x i64> <i64 133496, i64 1334961>, <2 x i64>* %31
%32 = getelementptr inbounds [15 x i64], [15 x i64]* %2, i64 0, i64 11
%33 = bitcast i64* %32 to <2 x i64>*
store <2 x i64> <i64 14684570, i64 176214841>, <2 x i64>* %33
%34 = getelementptr inbounds [15 x i64], [15 x i64]* %2, i64 0, i64 13
store i64 2290792932, i64* %34
%35 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %4)
%36 = load i64, i64* %4
%37 = add nsw i64 %36, -1
store i64 %37, i64* %4
%38 = icmp eq i64 %36, 0
br i1 %38, label %50, label %39
39: ; preds = %0, %39
%40 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %3)
%41 = load i64, i64* %3
%42 = getelementptr inbounds [15 x i64], [15 x i64]* %2, i64 0, i64 %41
%43 = load i64, i64* %42
%44 = getelementptr inbounds [15 x i64], [15 x i64]* %1, i64 0, i64 %41
%45 = load i64, i64* %44
%46 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i64 %43, i64 %45)
%47 = load i64, i64* %4
%48 = add nsw i64 %47, -1
store i64 %48, i64* %4
%49 = icmp eq i64 %47, 0
br i1 %49, label %50, label %39
50: ; preds = %39, %0
ret i32 0
}