Product of factorials
The Factorial of an integer n is defined as:
Given a positive integer n, you are asked to compute the product of factorials from 1 to n. So, you’re asked to compute the product of factorials:
The input contains a single integer n.
The program should print a single integer - the product of factorials from 1 to n.
Input | Output |
|---|---|
4 | 288 |
7 | 125411328000 |
Constraints
Time limit: 2 seconds
Memory limit: 512 MB
Output limit: 1 MB