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$$$.

Input

The only line of input contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n/4 < n < 998\,244\,353$$$).

Output

Print one number — the answer to the problem.

ExamplesInput
4 1
Output
2
Input
9 2
Output
48
Input
222222222 222222
Output
851798824

加入题单

算法标签: