Problem11331--[yosupo] Enumerative Combinatorics - Many Factorials

11331: [yosupo] Enumerative Combinatorics - Many Factorials

[Creator : ]
Time Limit : 3.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 10^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