Codeforces Round 722 (Div. 1)
F
AmShZ Farm
Codeforces
3300
原题
← E→
翻译中…

To AmShZ, all arrays are equal, but some arrays are more-equal than others. Specifically, the arrays consisting of $n$ elements from $1$ to $n$ that can be turned into permutations of numbers from $1$ to $n$ by adding a non-negative integer to each element.

翻译中…

Mashtali who wants to appear in every problem statement thinks that an array $b$ consisting of $k$ elements is compatible with a more-equal array $a$ consisting of $n$ elements if for each $1 \le i \le k$ we have $1 \le b_i \le n$ and also $a_{b_1} = a_{b_2} = \ldots = a_{b_k}$.

翻译中…

Find the number of pairs of arrays $a$ and $b$ such that $a$ is a more-equal array consisting of $n$ elements and $b$ is an array compatible with $a$ consisting of $k$ elements modulo $998244353$.

翻译中…

Note that the elements of $b$ are not necessarily distinct, same holds for $a$.

翻译中…

Input

翻译中…

The first line of input contains two integers $n$ and $k$ $(1 \le n \le 10^9 , 1 \le k \le 10^5)$.

翻译中…

Output

翻译中…

Print a single integer — the answer to the problem modulo $998244353$.

翻译中…

Note

翻译中…

There are eight possible pairs for the second example:

翻译中…
  1. $a = \{1, 1\}, b = \{1, 1\}$
  2. $a = \{1, 1\}, b = \{1, 2\}$
  3. $a = \{1, 1\}, b = \{2, 1\}$
  4. $a = \{1, 1\}, b = \{2, 2\}$
  5. $a = \{1, 2\}, b = \{1, 1\}$
  6. $a = \{1, 2\}, b = \{2, 2\}$
  7. $a = \{2, 1\}, b = \{1, 1\}$
  8. $a = \{2, 1\}, b = \{2, 2\}$
翻译中…

样例

Input #1
1 1
Output #1
1
InputCopy OutputCopy
Input #2
2 2
Output #2
8
InputCopy OutputCopy
Input #3
5 4
Output #3
50400
InputCopy OutputCopy
Input #4
20 100
Output #4
807645526
InputCopy OutputCopy
Input #5
10000000 10000
Output #5
883232350
InputCopy OutputCopy
题目信息
题号
1528F
时间限制
2 s
内存限制
256 MB
标签
组合数学
FFT
数学

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。