102284: [AtCoder]ABC228 E - Integer Sequence Fair
Description
Score : $500$ points
Problem Statement
Integer Sequence Exhibition is taking place, where integer sequences are gathered in one place and evaluated. Here, every integer sequence of length $N$ consisting of integers between $1$ and $K$ (inclusive) is evaluated and given an integer score between $1$ and $M$ (inclusive).
Print the number, modulo $998244353$, of ways to give each of the evaluated sequences a score between $1$ and $M$.
Here, two ways are said to be different when there is an evaluated sequence $A = (A_1, A_2, \ldots, A_N)$ that is given different scores by the two ways.
Constraints
- $1 \leq N, K, M \leq 10^{18}$
- $N$, $K$, and $M$ are integers.
Input
Input is given from Standard Input in the following format:
$N$ $K$ $M$
Output
Print the number, modulo $998244353$, of ways to give each of the evaluated sequences a score between $1$ and $M$.
Sample Input 1
2 2 2
Sample Output 1
16
Four sequences are evaluated: $(1, 1)$, $(1, 2)$, $(2, 1)$, and $(2, 2)$. There are $16$ ways to give each of these sequences a score between $1$ and $2$, as follows.
- Give $1$ to $(1, 1)$, $1$ to $(1, 2)$, $1$ to $(2, 1)$, and $1$ to $(2, 2)$
- Give $1$ to $(1, 1)$, $1$ to $(1, 2)$, $1$ to $(2, 1)$, and $2$ to $(2, 2)$
- Give $1$ to $(1, 1)$, $1$ to $(1, 2)$, $2$ to $(2, 1)$, and $1$ to $(2, 2)$
- Give $1$ to $(1, 1)$, $1$ to $(1, 2)$, $2$ to $(2, 1)$, and $2$ to $(2, 2)$
- $\cdots$
- Give $2$ to $(1, 1)$, $2$ to $(1, 2)$, $2$ to $(2, 1)$, and $2$ to $(2, 2)$
Thus, we print $16$.
Sample Input 2
3 14 15926535
Sample Output 2
109718301
Be sure to print the count modulo $998244353$.
Input
题意翻译
有一个长度为 $n$ 的整数序列,它里面的每一个元素的值都在 $[1,k]$ 范围内。对于每一个满足条件的序列,都给出一个值在 $[1,m]$ 之间的得分。请求出有多少种不同的方法满足题目要求?答案对 $998244353$ 取模。 数据范围:$1 \le n,k,m \le 10^{18}$,且上述三数均为整数。Output
分数:500分
问题描述
整数序列展示会正在举行,所有整数序列都集中在一个地方进行评估。在这里,每个长度为$N$的整数序列,由$1$到$K$(包括)之间的整数组成,都会被评估并给出一个在$1$到$M$(包括)之间的整数分数。
打印一种方法,使得对每个评估过的序列给出$1$到$M$之间的分数,其方式的数量对$998244353$取模。
当有两种方式时,如果存在一个被评估的序列$A = (A_1, A_2, \ldots, A_N)$,在这两种方式中被赋予不同的分数,则称这两种方式是不同的。
约束
- $1 \leq N, K, M \leq 10^{18}$
- $N$,$K$和$M$都是整数。
输入
输入从标准输入中给出,格式如下:
$N$ $K$ $M$
输出
打印一种方法,使得对每个评估过的序列给出$1$到$M$之间的分数,其方式的数量对$998244353$取模。
样例输入1
2 2 2
样例输出1
16
四个序列被评估:$(1, 1)$,$(1, 2)$,$(2, 1)$和$(2, 2)$。有$16$种方式对这些序列中的每个序列给出$1$到$2$之间的分数,如下所示。
- 将$1$赋予$(1, 1)$,$1$赋予$(1, 2)$,$1$赋予$(2, 1)$,$1$赋予$(2, 2)$
- 将$1$赋予$(1, 1)$,$1$赋予$(1, 2)$,$1$赋予$(2, 1)$,$2$赋予$(2, 2)$
- 将$1$赋予$(1, 1)$,$1$赋予$(1, 2)$,$2$赋予$(2, 1)$,$1$赋予$(2, 2)$
- 将$1$赋予$(1, 1)$,$1$赋予$(1, 2)$,$2$赋予$(2, 1)$,$2$赋予$(2, 2)$
- $\cdots$
- 将$2$赋予$(1, 1)$,$2$赋予$(1, 2)$,$2$赋予$(2, 1)$,$2$赋予$(2, 2)$
因此,我们打印$16$。
样例输入2
3 14 15926535
样例输出2
109718301
确保打印的计数对$998244353$取模。