Gửi bài giải
Điểm:
1,00 (OI)
Giới hạn thời gian:
1.0s
Giới hạn bộ nhớ:
256M
Input:
stdin
Output:
stdout
Nguồn bài:
Dạng bài
Ngôn ngữ cho phép
C, C++, Java, Kotlin, Pascal, PyPy, Python, Scratch
Vietnamese Women's Day is coming, Phuc wants to buy two gifts of the same price for his mother and sister. There are ~n~ items in the store. How many ways are there for Phuc to choose gifts?
Input
The first line is the number of testcases T (1 ≤ T ≤ ~10^{2}~)
Each test case consists of one line, the first number is the number of gifts n (0 ≤ n ≤ ~10^{5}~), and followed by n numbers ~a_i~ - the price of each gift.
Output
For each test case, print a line that is the number of ways to choose gifts
Sample Input:
2
5 3 4 3 4 3
3 1 1 1
Sample Output:
4
3
Bình luận