Factorial.java 280B

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