{"raw_statement":[{"iden":"problem statement","content":"There is a circle with circumference $L$, and $L$ people are standing equally spaced along the circumference. They are labeled as person $0, 1, \\cdots, L-1$ in clockwise order. Consider choosing $N$ from these $L$ people. The **cost** of a choice is defined as follows.\n\n*   For every pair of persons among the $N$ chosen people, find the minimum distance one person has to move along the circumference to reach the other person's position. The maximum value among these distances is the cost.\n\nFind the sum of costs over all possible choices, modulo $998244353$."},{"iden":"constraints","content":"*   $2 \\leq N \\leq L \\leq 10^6$\n*   All input values are integers."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$L$ $N$"},{"iden":"sample input 1","content":"4 2"},{"iden":"sample output 1","content":"8\n\nThe choices of $N$ people and their corresponding costs are as follows:\n\n*   $(0,1)$: cost $1$\n*   $(0,2)$: cost $2$\n*   $(0,3)$: cost $1$\n*   $(1,2)$: cost $1$\n*   $(1,3)$: cost $2$\n*   $(2,3)$: cost $1$\n\nThe sum of these costs, $8$, is the answer."},{"iden":"sample input 2","content":"5 5"},{"iden":"sample output 2","content":"2\n\nWe can only choose all of them. In this case, the cost is $2$."},{"iden":"sample input 3","content":"13 5"},{"iden":"sample output 3","content":"7618"},{"iden":"sample input 4","content":"1000000 100000"},{"iden":"sample output 4","content":"664396470"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}