#P2789. Intersection Points of Lines
Intersection Points of Lines
Intersection Points of Lines
Given a plane with N straight lines such that no three lines are concurrent, determine the number of intersection points among these lines.
The number of intersection points is given by the formula: \(\binom{N}{2} = \frac{N(N-1)}{2}\).
inputFormat
The input consists of a single line containing an integer N (0 ≤ N ≤ 109) representing the number of lines.
outputFormat
Output a single integer, the number of intersection points computed using the formula \(\frac{N(N-1)}{2}\).
sample
0
0