Factorial.java 287B

1234567891011121314151617
  1. import java.math.BigInteger;
  2. public class Factorial {
  3. public BigInteger factorialOf(Integer value){
  4. BigInteger result = BigInteger.ONE;
  5. for (; value > 1; value--) {
  6. result = result.multiply(BigInteger.valueOf(value));
  7. }
  8. return result;
  9. }
  10. }