| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 2048 MB | 30 | 23 | 20 | 76.923% |
You are given three integers $p$, $k$, $t$, where $p$ is a prime number.
The set $S$ is defined as follows: $S = \{x \mid x \in N, \ 1 \leq x \leq p - 1, \ x \neq k \}$.
Find the sum of the products of all $t$-element subsets of $S$, modulo $p$.
The first line contains three integers $p$, $k$, $t$ ($p$ is a prime number; $1 \leq k \leq p-1$; $1 \leq t \leq p-2$; $p \leq 10^9$).
Print the sum of the products of all $t$-element subsets of $S$, modulo $p$.
7 5 3
1
11 6 7
3