Factorials of n gt 20 cant be stored even in a 64-bit long


You are given an integer N. Print the factorial of this number.

Input 
Input consists of a single integer N, where 1<=N<=100.

Output 
Print the factorial of N.

Example 
For an input of 25, you would print 15511210043330985984000000 .

Note: Factorials of N > 20 can't be stored even in a 64-bit long long variable. Big integers must be used for such calculations. Languages like Java, Python, Ruby etc. can handle big integers, but we need to write additional code in C/C++ to handle huge values.

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Factorials of n gt 20 cant be stored even in a 64-bit long
Reference No:- TGS01478304

Now Priced at $20 (50% Discount)

Recommended (92%)

Rated (4.4/5)