{"raw_statement":[{"iden":"problem statement","content":"There is a monster with initial stamina $N$.  \nTakahashi repeatedly attacks the monster while the monster's stamina remains $1$ or greater.\nAn attack by Takahashi reduces the monster's stamina by $2$ with probability $\\frac{P}{100}$ and by $1$ with probability $1-\\frac{P}{100}$.\nFind the expected value, modulo $998244353$ (see Notes), of the number of attacks before the monster's stamina becomes $0$ or less."},{"iden":"notes","content":"We can prove that the sought expected value is always a finite rational number. Moreover, under the Constraints of this problem, when the value is represented as $\\frac{P}{Q}$ by two coprime integers $P$ and $Q$, we can show that there exists a unique integer $R$ such that $R \\times Q \\equiv P\\pmod{998244353}$ and $0 \\leq R \\lt 998244353$. Print such $R$."},{"iden":"constraints","content":"*   $1 \\leq N \\leq 2\\times 10^5$\n*   $0 \\leq P \\leq 100$\n*   All values in the input are integers."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$ $P$"},{"iden":"sample input 1","content":"3 10"},{"iden":"sample output 1","content":"229596204\n\nAn attack by Takahashi reduces the monster's stamina by $2$ with probability $\\frac{10}{100}=\\frac{1}{10}$ and by $1$ with probability $\\frac{100-10}{100}=\\frac{9}{10}$.\n\n*   The monster's initial stamina is $3$.\n*   After the first attack, the monster's stamina is $2$ with probability $\\frac{9}{10}$ and $1$ with probability $\\frac{1}{10}$.\n*   After the second attack, the monster's stamina is $1$ with probability $\\frac{81}{100}$, $0$ with probability $\\frac{18}{100}$, and $-1$ with probability $\\frac{1}{100}$. With probability $\\frac{18}{100}+\\frac{1}{100}=\\frac{19}{100}$, the stamina becomes $0$ or less, and Takahashi stops attacking after two attacks.\n*   If the stamina remains $1$ after two attacks, the monster's stamina always becomes $0$ or less by the third attack, so he stops attacking after three attacks.\n\nTherefore, the expected value is $2\\times \\frac{19}{100}+3\\times\\left(1-\\frac{19}{100}\\right)=\\frac{281}{100}$. Since $229596204 \\times 100 \\equiv 281\\pmod{998244353}$, print $229596204$."},{"iden":"sample input 2","content":"5 100"},{"iden":"sample output 2","content":"3\n\nTakahashi's attack always reduces the monster's stamina by $2$. After the second attack, the stamina remains $5-2\\times 2=1$, so the third one is required."},{"iden":"sample input 3","content":"280 59"},{"iden":"sample output 3","content":"567484387"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}