{"problem":{"name":"Coin 2","description":{"content":"You have coins of denominations $1, 2, \\dots, N$ yen. For each denomination $i$, you have $A_i$ coins.   Coins of the same denomination are indistinguishable. Find the number of ways to pay exactly $N","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_n"},"statements":[{"statement_type":"Markdown","content":"You have coins of denominations $1, 2, \\dots, N$ yen. For each denomination $i$, you have $A_i$ coins.  \nCoins of the same denomination are indistinguishable.\nFind the number of ways to pay exactly $N$ yen using these coins, and output the result modulo $998244353$.  \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 N \\leq 2.5 \\times 10^5$\n*   $1 \\leq A_i \\leq N$\n*   All input values are integers\n\n## Input\n\nThe input is given from standard input in the following format:\n\n$N$\n$A_1$ $A_2$ $\\dots$ $A_N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"fps_24_n","tags":[],"sample_group":[["3\n1 2 3","2\n\nThere are $2$ ways to pay exactly $3$ yen:\n\n*   Use one $1$\\-yen coin and one $2$\\-yen coin.\n*   Use one $3$\\-yen coin."],["10\n3 1 4 1 5 9 2 6 5 3","20"]],"created_at":"2026-03-03 11:01:14"}}