#845
Bronze I
SJECIŠTA
시간 제한
1s
메모리 제한
32MB
제출
0
정답
0
맞힌 사람
0
정답 비율
0.0%

문제

Consider a convex polygon with NN vertices, with the additional property that no three diagonals intersect in a single point. Find the number of intersections between pairs of diagonals in such a polygon.

The figure below shows one such polygon with 6 vertices.

Note: a polygon is convex if all of its interior angles are less than 180 degrees.

입력

The first and only line of input contains a single integer NN, 3N1003 \leq N \leq 100.

출력

Output the number of intersections on a single line.

예제 입력 1

3

예제 출력 1

0

예제 입력 2

4

예제 출력 2

1

예제 입력 3

6

예제 출력 3

15
코드 제출

코드를 제출하려면 로그인이 필요합니다.

로그인
내 제출
제출 내역이 없습니다.
맞은 사람
아직 맞은 사람이 없습니다.
난이도 투표
Bronze I1명 투표· 약 1개월 전
로그인 후 AC 받으면 투표할 수 있습니다.
전체 제출
제출 내역이 없습니다.