Submit solution

Points:
10

Time limit:
0.6s

Memory limit:
64M

Author:

Problem type

Allowed languages

Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, ~~CommonLisp~~, D, Dart, F#, Forth, Fortran, Go, ~~Groovy~~, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, ~~Nim~~, ~~ObjC~~, OCaml, ~~Octave~~, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

quantum is not in a good mood today, so he has decided to torment people. He wants you to write a large factorial calculator. More specifically, he wants you to calculate very *very* **very** large factorials. He wishes you luck.

#### Input Specification

The first line of input contains the integer , , the number of cases to follow.

The next lines will contain an integer , such that , whose factorial you are to calculate.

#### Output Specification

For every integer , you are to output .

#### Sample Input

```
2
5
13
```

#### Sample Output

```
120
1932053504
```

## Comments

Can someone tell me what's wrong with my solution???

https://dmoj.ca/submission/709777

`2 ^ 32`

is notI have a solution to this problem, and I can't find anything wrong with it. I checked it in some other C++ coder, and it gave the right values. Can someone help me with why the second test case always shows me WA? Thanks!

Changing

`signed long long int`

to`unsigned long long`

seems to fix it.Probably overflowed.

Hey, it works! Thank you so much for all your help Shinigami!

The value of is more interesting to compute and optimize.

No please all we wanted was happiness