시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
6 초 | 256 MB | 20 | 16 | 15 | 78.947% |
Given an integer $n$, the sequence is called good if its elements are from $[1, n]$ and all its non-empty subsequences (not necessarily continuous) have sums not divisible by $n$.
Calculate the number of good sequences of length $n-k$ modulo $998\,244\,353$.
The only line of input contains two integers $n$ and $k$ ($1 \le k \le n/4 < n < 998\,244\,353$).
Print one number --- the answer to the problem.
4 1
2
9 2
48
222222222 222222
851798824