• + 1 comment

    Here is the solution in Java.

    static void extraLongFactorials(int n) {
            BigInteger fact=BigInteger.valueOf(1);
            for(int i=1;i<=n;i++){
                fact=fact.multiply(BigInteger.valueOf(i));
            }
            System.out.println(fact);
        }