You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
int main() {
|
|
// 15 3 4
|
|
int n, a, b;
|
|
cin >> n >> a >> b;
|
|
n -= a * (b - 1);
|
|
n--, a--;
|
|
int x = 1, y = 1;
|
|
for (int i = n; i > n - a; i--) x *= i;
|
|
for (int i = a; i; i--) y *= i;
|
|
printf("%d\n", x / y);
|
|
return 0;
|
|
} |