Factorial.java 274B

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