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 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≤i≤k we have 1≤bi≤n and also ab1=ab2=…=abk .
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 .
输入格式
The first line of input contains two integers n and k (1≤n≤109,1≤k≤105) .
输出格式
Print a single integer — the answer to the problem modulo 998244353 .
输入输出样例
输入#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:
- a={1,1},b={1,1}
- a={1,1},b={1,2}
- a={1,1},b={2,1}
- a={1,1},b={2,2}
- a={1,2},b={1,1}
- a={1,2},b={2,2}
- a={2,1},b={1,1}
- a={2,1},b={2,2}