#P11029. 『DABOI Round 1』A Simple Problem

『DABOI Round 1』A Simple Problem

Background

Red problems make people "red-hot" (hong wen).

Problem Description

Compute $\prod \limits_{i=1}^{n} \prod\limits_{j=1}^{i} \prod \limits_{k=1}^{j} k^k$ modulo 998244353998244353.

Input Format

The input contains 11 line with 11 integer, which is nn.

Output Format

Output 11 line with 11 integer, which is the answer.

3
1728

Hint

Constraints

  • For 20%20\% of the testdata, n5×102n\leq5\times10^2.
  • For 50%50\% of the testdata, n5×103n\leq5\times10^3.
  • For 100%100\% of the testdata, 1n1.8×1061\leq n\leq1.8\times10^6.

Translated by ChatGPT 5