#Large Factorials
In mathematics, the factorial of integer n is written as n!. It is equal to the product of n and every integer preceding it. For example: 5! = 1 x 2 x 3 x 4 x 5 = 120
Your mission is simple: write a function that takes an integer n and returns the value of n!.
You are guaranteed an integer argument. For any values outside the non-negative range, return null, nil or None (return an empty string "" in C and C++). For non-negative numbers a full length number is expected for example, return 25! = "15511210043330985984000000" as a string.
For more on factorials, see http://en.wikipedia.org/wiki/Factorial
'매일매일개발 > Codewars' 카테고리의 다른 글
Codewars #11 Double Cola (5kyu) (0) | 2018.03.30 |
---|---|
Codewars #10 Scramblies (5kyu) (0) | 2018.03.28 |
Codewars #8 Middle Permutation (4kyu) (0) | 2018.03.26 |
Codewars #7 Josephus Permutation (5kuy) (0) | 2018.03.25 |
Codewars #6 Calculate String Rotation (6kuy) (0) | 2018.03.24 |