Factorial.java 286B

123456789101112
  1. import java.math.BigInteger;
  2. public class Factorial {
  3. public BigInteger factorialOf(Integer value){
  4. BigInteger num = new BigInteger("1");
  5. for (long i = 1; i <= value; i++){
  6. num = num.multiply(BigInteger.valueOf(i));
  7. }
  8. return num;
  9. }
  10. }