Problem11330--[yosupo] Enumerative Combinatorics - Factorial

11330: [yosupo] Enumerative Combinatorics - Factorial

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 512 MiB

Description

This problem has $T$ cases.

Given a non-negative integer $N$. Print $N!$ modulo $998244353$.

Input

$T$
$N_1$
$\vdots$
$N_T$

Output

Print $N!$ modulo $998244353$.

Constraints

- $1\leq T\leq 5$
- $0 \leq N < 998244353$

Sample 1 Input

5
0
5
100
1234567
998244352

Sample 1 Output

1
120
35305197
972177311
998244352

HINT

Yosupo.

Source/Category