408663: GYM103260 C Multiple?
Memory Limit:0 MB
Time Limit:4 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
C. Multiple?time limit per test4 secondsmemory limit per test256 mebibytesinputstandard inputoutputstandard output
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$$$.
InputThe only line of input contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n/4 < n < 998\,244\,353$$$).
OutputPrint one number — the answer to the problem.
ExamplesInput4 1Output
2Input
9 2Output
48Input
222222222 222222Output
851798824