Factorial.java 269B

123456789101112131415161718
  1. import java.math.BigInteger;
  2. public class Factorial {
  3. public BigInteger factorialOf(Integer value){
  4. long result = 1;
  5. for(long x = 2; x <= value; x++){
  6. result *= x;
  7. }
  8. return BigInteger.valueOf(result);
  9. }
  10. }