Write a function to calculate the factorial of a number.
EasyProblem Statement
Write a function to calculate the factorial of a number.
Sample Input
num = 5
Sample Output
120
Limits
Time: 2s · Memory: 256 MB
Write a function to calculate the factorial of a number.
num = 5
120
Time: 2s · Memory: 256 MB