#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 *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int T, n, ans, temp, i;
  scanf("%d", &T);
  while (T--) {
    ans = 0;
    int nums[101] = {0};
    scanf("%d", &n);
    for (i = 0; i < n; i++) {
      scanf("%d", &temp);
      if (nums[temp] == 0) {
        nums[temp] = 1;
        ans++;
      }
    }
    printf("%d\n", ans);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1b0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb7(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
je     1204 <main+0xd4>
movl   $0x0,-0x10(%rbp)
lea    -0x1b0(%rbp),%rdi
xor    %esi,%esi
mov    $0x194,%edx
call   1040 <memset@plt>
lea    0xe79(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11f0 <main+0xc0>
lea    0xe56(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1050 <scanf@plt>
movslq -0x14(%rbp),%rax
cmpl   $0x0,-0x1b0(%rbp,%rax,4)
jne    11dd <main+0xad>
movslq -0x14(%rbp),%rax
movl   $0x1,-0x1b0(%rbp,%rax,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11e2 <main+0xb2>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1197 <main+0x67>
mov    -0x10(%rbp),%esi
lea    0xe09(%rip),%rdi
call   1030 <printf@plt>
jmp    1152 <main+0x22>
xor    %eax,%eax
add    $0x1b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1a8,%rsp
lea    0xeb8(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1050 <scanf@plt>
subl   $0x1,0x8(%rsp)
jae    116d <main+0x3d>
xor    %eax,%eax
add    $0x1a8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xe8c(%rip),%rbx
lea    0x4(%rsp),%r15
lea    0xc(%rsp),%r12
lea    0xe7e(%rip),%r13
jmp    11a1 <main+0x71>
nopw   0x0(%rax,%rax,1)
mov    %r13,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
subl   $0x1,0x8(%rsp)
jb     1159 <main+0x29>
xor    %ebp,%ebp
mov    $0x194,%edx
lea    0x10(%rsp),%rdi
xor    %esi,%esi
call   1040 <memset@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
jle    1190 <main+0x60>
xor    %r14d,%r14d
xor    %ebp,%ebp
jmp    11db <main+0xab>
nopl   (%rax)
add    $0x1,%r14d
cmp    0x4(%rsp),%r14d
jge    1190 <main+0x60>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1050 <scanf@plt>
movslq 0xc(%rsp),%rax
cmpl   $0x0,0x10(%rsp,%rax,4)
jne    11d0 <main+0xa0>
movl   $0x1,0x10(%rsp,%rax,4)
add    $0x1,%ebp
jmp    11d0 <main+0xa0>

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

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