QOJ.ac

QOJ

Time Limit: 3 s Memory Limit: 512 MB Total points: 100

#10933. Maximum Value

统计

Nasshitaka4692 has $n$ variables $a_1, \dots, a_n$, all initially $0$. He will perform $k$ rounds of operations. In each round, he chooses one variable uniformly at random and increments it by $1$. He wants to know the expected value of $\max \{a_1, \dots, a_n\}$. You only need to help him calculate the result of this expected value multiplied by $n^k$, modulo $998244353$.

Input

Input two positive integers $n, k$.

Output

Output a single number representing the answer.

Examples

Input 1

2 5

Output 1

110

Input 2

4 6

Output 2

11544

Input 3

10 66

Output 3

686029191

Subtasks

For $100\%$ of the data, it is guaranteed that $1 \le n \le 10$ and $1 \le k \le 10^5$.

  • Test cases $1$ and $2$ guarantee $n=1$ and $n=2$ respectively.
  • For test cases $i$ ($3 \le i \le 20$), it is guaranteed that $k \le 10^{(i+10)/6}$.

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.