UVa 623

From Algorithmist

Jump to: navigation, search

Contents

[edit] 623 - 500!

[edit] Summary

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

[edit] Explanation

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

[edit] Gotchas

Although the problem is called 500!, the actual input limit is N = 1000.

[edit] Input

10
30
50
100

[edit] Output

10!
3628800
30!
265252859812191058636308480000000
50!
30414093201713378043612608166064768844377641568960512000000000000
100!
93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000
Personal tools