#PCBSAU0000011. Số cái bắt tay (Handshake Count)
Số cái bắt tay (Handshake Count)
Handshake Count
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
Given people, every unordered pair of distinct people shakes hands exactly once. Count the total handshakes.
Input
One line containing integer .
Output
Print the number of unordered pairs of distinct people.
Subtask
- Subtask 1 — 100 points: .
Example
Input
4
Output
6
Explanation
For , each of the six unordered pairs shakes hands once. The formula gives the output 6.