CF1528F.AmShZ Farm

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

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

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

Find the number of pairs of arrays aa and bb such that aa is a more-equal array consisting of nn elements and bb is an array compatible with aa consisting of kk elements modulo 998244353998244353 .

Note that the elements of bb are not necessarily distinct, same holds for aa .

输入格式

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

输出格式

Print a single integer — the answer to the problem modulo 998244353998244353 .

输入输出样例

  • 输入#1

    1 1

    输出#1

    1
  • 输入#2

    2 2

    输出#2

    8
  • 输入#3

    5 4

    输出#3

    50400
  • 输入#4

    20 100

    输出#4

    807645526
  • 输入#5

    10000000 10000

    输出#5

    883232350

说明/提示

There are eight possible pairs for the second example:

  1. a={1,1},b={1,1}a = \{1, 1\}, b = \{1, 1\}
  2. a={1,1},b={1,2}a = \{1, 1\}, b = \{1, 2\}
  3. a={1,1},b={2,1}a = \{1, 1\}, b = \{2, 1\}
  4. a={1,1},b={2,2}a = \{1, 1\}, b = \{2, 2\}
  5. a={1,2},b={1,1}a = \{1, 2\}, b = \{1, 1\}
  6. a={1,2},b={2,2}a = \{1, 2\}, b = \{2, 2\}
  7. a={2,1},b={1,1}a = \{2, 1\}, b = \{1, 1\}
  8. a={2,1},b={2,2}a = \{2, 1\}, b = \{2, 2\}
首页