A. 阶乘计算

    Type: Default 2000ms 512MiB

阶乘计算

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

求阶乘是 sucrose 的基本操作,但是她究竟能做到什么复杂度呢?

sucrose 想让你计算 n!n!,答案对 2322^{32} 取模。

输入格式

第一行一个整数 TT 表示数据组数。

接下来 TT 行,每行一个整数 nn

输出格式

TT 行,每行一个整数表示答案。

样例输入

2
15
4

样例输出

2004310016
24

数据范围

对于10%10\%的数据,T=0T=0

对于20%20\%的数据,n12n\leq 12

对于60%60\%的数据,n105n\leq 10^5

对于所有数据,0T2000,1n<2310\leq T\leq 2000,1\leq n < 2^{31}

10.24

Not Attended
Status
Done
Rule
OI
Problem
4
Start at
2023-10-24 10:10
End at
2023-10-24 13:40
Duration
3.5 hour(s)
Host
Partic.
1