11331: [yosupo] Enumerative Combinatorics - Many Factorials
[Creator : ]
Description
This problem has $T$ cases.
Given a non-negative integer $N$. Print $N!$ modulo $998244353$.
Given a non-negative integer $N$. Print $N!$ modulo $998244353$.
Input
$T$
$N_1$
$\vdots$
$N_T$
$N_1$
$\vdots$
$N_T$
Output
Print $N!$ modulo $998244353$.
Constraints
- $1\leq T\leq 10^5$
- $0 \leq N < 998244353$
- $0 \leq N < 998244353$
Sample 1 Input
5
0
5
100
1234567
998244352
Sample 1 Output
1
120
35305197
972177311
998244352