beecrowd | 1609

Counting Sheep

By Bruno Adami, Universidade de São Paulo - São Carlos BR Brazil

Timelimit: 1

You have decided to count sheep to sleep. You are taking too long to fall asleep and you realized that some of the sheep are repeating! Each one is identified by a unique integer, thus you can avoid counting repeated ones.

Given the sheep sequence, output how many you really counted, it is, output the number of distinct ones.

Input

The first line contains an integer T (T = 100*) indicating the number of test cases.

In the first line of each case we have an integer N (1 ≤ N ≤ 100* or 1 ≤ N ≤ 104​**), indicating the number of sheep. The next line contains N integers separated by space indicating the sequence of sheep.

The sheep identifiers will be between 0 and 109, inclusive.

*For around 90% of the cases;

**For the other cases.

Output

Output the number of distinct sheep for each test case.

Sample Input Sample Output

3

3

1 2 3

3

1 2 1

5

100 1 1 0 0

3

2

3