UVa 623 - 500!

623 - 500!

 * http://acm.uva.es/p/v6/623.html

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.

Input
10 30 50 100

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