Factorial.java 307B

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