[Source](https://www.hackerrank.com/challenges/extra-long-factorials)
# Problem statement
The factorial of the integer ![](./Resources/Element1.svg), written ![](./Resources/Element2.svg), is defined as:   



Calculate and print the factorial of a given integer.  

For example, if ![](./Resources/Element3.svg), we calculate ![](./Resources/Element4.svg) and get ![](./Resources/Element5.svg).


**Function Description**

Complete the extraLongFactorials function in the editor below.  It should print the result and return.  

extraLongFactorials has the following parameter(s):  


* n: an integer

**Note:** Factorials of ![](./Resources/Element6.svg) can't be stored even in a ![](./Resources/Element7.svg) 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.  

We recommend solving this challenge using BigIntegers.  


**Input Format**

Input consists of a single integer ![](./Resources/Element1.svg)


**Constraints**

![](./Resources/Element8.svg)


**Output Format**

Print the factorial of ![](./Resources/Element1.svg). 


**Sample Input**

![](./Resources/Element9.svg)


**Sample Output**

![](./Resources/Element10.svg)


**Explanation**

![](./Resources/Element11.svg)

