UVa 623 - 500!

Summary
A BigNum problem. Precalculate all possible factorials, and print them out when requested.

Explanation
A BigNum problem. Precalculate all possible factorials, and print them out when requested.

Gotchas
Although the problem is called 500!, the actual input limit is N = 1000. And Remember that 0! = 1.

Input
10 30 50 100

Output
10! 3628800 30! 265252859812191058636308480000000 50! 30414093201713378043612608166064768844377641568960512000000000000 100! 93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000

Solutions

 * Code All the Problems