N!Time
limit:10000/5000 MS (java/others) Memory limit:262144/262144 K (java/others)
Total submission (s): 64256 Accepted Submission (s): 18286
Problem Descriptiongiven an integer n (0≤n≤10000), your task is to calculate N!
Inputone N in one line, process to the end of file.
Outputfor each n, output N! In one line.
Sample Input
123
Sample Output
126
Authorjgshining (Aurora Dazzle)
Recommendwe carefully selected several similar problems for you:1715 1047 1063 1753 1316
Java Dafa Good, back C to protect peace .... Joking, Java and C each have their advantages and disadvantages, indispensable! I will not large number of templates, the use of BigInteger, HDU large number of water problems do not explain!
Import java.io.*;import java.math.biginteger;import java.util.*;p ublic class main{public static void Main (string[] args {Scanner input = new Scanner (system.in); while (Input.hasnext ()) {int n = input.nextint (); BigInteger p = biginteger.one;for (int i=1;i<=n;i++) {p=p.multiply (biginteger.valueof (i));} SYSTEM.OUT.PRINTLN (P);}}
hdu-1042-n! (Java Dafa good && hdu large number of water problems)