No.3394 Big Binom
Problem Statement
There are $N$ distinguishable reindeer. How many combinations are there for choosing exactly $K$ reindeer from among them? Here, if the set of chosen reindeer is the same and only the order of choosing differs, the choices are considered the same.
Since the answer can be very large, report the answer modulo $998244353$.
Constraints
- $1 \leq N \leq 10^{9}$
- $0 \leq K \leq N$
Input
$N$ $K$
Output
Output the answer modulo $998244353$.
Sample
Sample 1
Input
5 3
Output
10
There are $10$ combinations for choosing exactly $3$ reindeer from $5$ distinguishable reindeer.
Sample 2
Input
33 16
Output
168558757
There are $1166803110$ combinations for choosing exactly $16$ reindeer from $33$ distinguishable reindeer. Output $168558757$, which is this number modulo $998244353$.
Sample 3
Input
998244355 2
Output
1
Sample 4
Input
998244355 3
Output
0
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
Cafe1942