'commit'
This commit is contained in:
15
TangDou/XiTi/1426.cpp
Normal file
15
TangDou/XiTi/1426.cpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user