高精度...直接java大数就可以...
import java.math.BigInteger;
import java.util.Scanner;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner cin=new Scanner(System.in);
while (cin.hasNextInt()) {
BigInteger ans=BigInteger.ONE;
int n=cin.nextInt();
for (int i=2;i<=n;i++) {
ans=ans.multiply(BigInteger.valueOf(i));
}
System.out.println(ans);
}
}
}