SPOJ FCTRL2

Summary
The problem asks us to calculate factorials of some small positive integers. This is a standard BigNum problem. Just preprocess the 100 possible answers and print it out when requested.

Explanation
This is a standard BigNum problem of calculating multiplications. Preprocessing the 100 possible answers will save us time.

Implementation
Const int MaximumNumberOfDigits = 158; // [log10(100!)]+1 // log(a*b) = log(a)+log(b)

Input
4 1 2 5 3

Output
1 2 120 6