{"problem":{"name":"Coin","description":{"content":"You have an unlimited number of coins of denominations $1$, $2$, $\\dots$, $M$ yen.   Coins of the same denomination are indistinguishable. You are given integers $N$ and $L$. For each $m = 1, 2, \\dots","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"fps_24_g"},"statements":[{"statement_type":"Markdown","content":"You have an unlimited number of coins of denominations $1$, $2$, $\\dots$, $M$ yen.  \nCoins of the same denomination are indistinguishable.\nYou are given integers $N$ and $L$. For each $m = 1, 2, \\dots, M-L+1$, solve the following problem:\n\n*   You may use coins of denominations $m, m+1, \\dots, m+L-1$ freely.  \n    (Formally, you may use coins of denomination $x$ for all $x$ satisfying $m \\leq x \\leq m+L-1$.)  \n    Find the number of ways to pay exactly $N$ yen using these coins, modulo $998244353$.\n\nTwo payment methods are considered different if there exists at least one denomination for which the number of coins used differs.\n\n## Constraints\n\n*   $1 \\leq L \\leq M \\leq N \\leq 5000$\n*   $N, M, L$ are integers\n\n## Input\n\nThe input is given from standard input in the following format:\n\n$N$ $M$ $L$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"fps_24_g","tags":[],"sample_group":[["5 3 2","3\n1\n\nFor $m=1$, using coins of denominations $1$ and $2$, there are $3$ ways to pay exactly $5$ yen:\n\n*   Pay $5$ coins of $1$ yen.\n*   Pay $3$ coins of $1$ yen and $1$ coin of $2$ yen.\n*   Pay $1$ coin of $1$ yen and $2$ coins of $2$ yen.\n\nFor $m=2$, using coins of denominations $2$ and $3$, there is $1$ way to pay exactly $5$ yen:\n\n*   Pay $1$ coin of $2$ yen and $1$ coin of $3$ yen."],["5000 2500 2495","878712345\n520404421\n886134625\n125526485\n307727973\n257205353"]],"created_at":"2026-03-03 11:01:14"}}