Factorial.java 318B

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