#K92072. Tournament Matches Calculation
Tournament Matches Calculation
Tournament Matches Calculation
In this problem, you are given an integer (P) representing the number of players in a tournament where each player competes against every other player exactly once. Your task is to compute the total number of matches played. The answer is given by the formula (T = \frac{P(P-1)}{2}).
inputFormat
The input consists of a single integer (P) ((P \ge 2)) given via standard input (stdin) representing the number of players.
outputFormat
Print a single integer representing the total number of matches played in the tournament to standard output (stdout).## sample
5
10