| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 1024 MB | 62 | 24 | 13 | 25.490% |
Dr. Ceizenpok from planet i1c5l became famous across the whole Universe thanks to his recent discovery --- the Ceizenpok’s formula. This formula has only three arguments: $n,ドル $k$ and $m,ドル and its value is a number of $k$-combinations of a set of $n$ modulo $m$.
While the whole Universe is trying to guess what the formula is useful for, we need to automate its calculation.
Single line contains three integers $n,ドル $k,ドル $m,ドル separated with spaces (1ドル \le n \le 10^{18},ドル 0ドル \le k \le n,ドル 2ドル \le m \le 1,000円,000円$).
Write the formula value for given arguments $n,ドル $k,ドル $m$.
2 1 3
2
4 2 5
1