Factorial.java 347B

1234567891011121314151617181920
  1. import java.math.BigInteger;
  2. public class Factorial {
  3. public BigInteger factorialOf(int value){
  4. BigInteger factorialOf = new BigInteger("1");
  5. for (int i = value; i > 0; i--) {
  6. factorialOf = factorialOf.multiply(BigInteger.valueOf(i));
  7. }
  8. return factorialOf;
  9. }
  10. }