Factorial.java 292B

1234567891011121314151617
  1. import java.math.BigInteger;
  2. import java.util.stream.LongStream;
  3. public class Factorial {
  4. public BigInteger factorialOf(Integer value){
  5. return BigInteger.valueOf(
  6. LongStream.rangeClosed(1, value).reduce(1, (x, y) -> x * y)
  7. );
  8. }
  9. }