Factorial.java 275B

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