#P2181. 对角线
对角线
Description
For an -vertex convex polygon in which no three diagonals intersect at a single point, find the number of intersection points among its diagonals.
For example, a -gon:

Input Format
The input contains a single line with an integer , the number of sides.
Output Format
Output a single integer on one line: the answer.
3
0
6
15
Hint
Constraints
- For of the testdata, it is guaranteed that .
- For of the testdata, it is guaranteed that .
Translated by ChatGPT 5
京公网安备 11011102002149号