Số tập con (dễ)

View as PDF

Submit solution

Points: 0.10
Time limit: 1.0s
Memory limit: 64M
Input: stdin
Output: stdout

Authors:
Problem type

Cho tập hợp ~A~ gồm ~n~ phần tử phân biệt. Đếm số tập con có ~2~ phần tử của ~A~.

Input

Dòng đầu tiên gồm số nguyên dương ~n~ với ~1 \le n \le 10^5~, dòng tiếp theo gồm ~n~ phần tử có giá trị tuyệt đối không vượt quá ~10^6.~

Output

Số tập con cần tìm.

Sample input

4
3 5 7 9

Output

6

Ghi chú: sau khi giải bài này xong thì bạn có thấy thông tin nào không cần thiết hay không? ^^


Comments

Please read the guidelines before commenting.


There are no comments at the moment.