Untitled

mail@pastecode.io avatar
unknown
plain_text
3 years ago
300 B
0
Indexable
Never
#include<bits/stdc++.h>
using namespace std;
long long int fact(long long int n)
{
	if (n == 0)
		return 1;
	else
		return (n * fact(n - 1));
}
int main()
{
	long long int n, r;
	cin >> n >> r;
	long long int ncr = fact(n) / (fact(r) * fact(n - r));
	cout << ncr << endl;
	return 0;
}