시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 26 11 10 47.619%

문제

컴퓨터 공학에 흥미를 잃은 상근이는 로드샵을 열었다. 로드샵의 주력상품은 구슬 목걸이다. 상근이네 집에는 구슬이 무한히 많다. 색상은 총 n가지이고, 이들을 각각 m개 이상씩 뽑아서 r개의 구슬로 된 목걸이를 만들려고 한다. 상근이는 여성들의 유니크함을 이해하는 남자이다. 따라서, 색 조합이 다른 목걸이를 하나씩 다 만들려고 한다. 상근이가 만들 수 있는 목걸이의 종류는 몇 가지 일까?

입력

첫재 줄에 n, m, r이 주어진다.

출력

첫째 줄에 만들 수 있는 목걸이가 총 몇 종류나 있는지 출력한다.

제한

  • 0 ≤ m<n ≤ r ≤ 10000

예제 입력 1

2 0 3

예제 출력 1

4

예제 입력 2

3 1 4

예제 출력 2

3

예제 입력 3

4 2 5

예제 출력 3

0
W3sicHJvYmxlbV9pZCI6IjU2MTYiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWI4NWNcdWI0ZGNcdWMwZjUiLCJkZXNjcmlwdGlvbiI6IjxwPlx1Y2VmNFx1ZDRlOFx1ZDEzMCBcdWFjZjVcdWQ1NTlcdWM1ZDAgXHVkNzY1XHViYmY4XHViOTdjIFx1Yzc4M1x1Yzc0MCBcdWMwYzFcdWFkZmNcdWM3NzRcdWIyOTQgXHViODVjXHViNGRjXHVjMGY1XHVjNzQ0IFx1YzVmNFx1YzVjOFx1YjJlNC4gXHViODVjXHViNGRjXHVjMGY1XHVjNzU4IFx1YzhmY1x1YjgyNVx1YzBjMVx1ZDQ4OFx1Yzc0MCBcdWFkNmNcdWMyYWMgXHViYWE5XHVhYzc4XHVjNzc0XHViMmU0LiBcdWMwYzFcdWFkZmNcdWM3NzRcdWIxMjQgXHVjOWQxXHVjNWQwXHViMjk0IFx1YWQ2Y1x1YzJhY1x1Yzc3NCBcdWJiMzRcdWQ1NWNcdWQ3ODggXHViOWNlXHViMmU0LiBcdWMw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