Factorial.java 296B

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