Factorial of a large number
Submit solution
Points:
3 (partial)
Time limit:
1.0s
Memory limit:
977M
Author:
Problem types
Allowed languages
Ada, Assembly, Awk, C, C++, C11, CLANG, CLANGX, Classical, COBOL, Coffee, CSC, D lang, DART, F95, FORTH, Fortrn, GAS32, GO, Haskell, Itercal, Java, kotlin, LEAN, LISP, LUA, MONOVB, Nasm, OCAML, Pascal, Perl, php, PIKE, prolog, Pypy, Python, Ruby 2, RUST, Scala, SCM, SED, SWIFT, TCL, TUR, V8JS, VB, ZIG
Enter a positive integer n \((1 \le n \le 1000)\). Your task prints out the values of n factorials according to the formula \[ n! = \prod \limits_ {i = 1} ^ {n} {i} = 1 * 2 * 3 * ... * n \]
Input
A positive integer n \((1 \ le n \ le 1000)\)
Output
A positive integer is the value of n factorials
Example 1
Input
32
Output
263130836933693530167218012160000000
Example 2
Input
101
Output
94259477598383594208516231244829367495623127947025437683278893534169775993162214765030878615918083469116234900035495995833697063026032640000000000000000000000000000
Comments
code tham khảo