• + 0 comments

    JS/Javascript solution:-

    function extraLongFactorials(n) {
        let ans = n;
        let i = n;
        while (i > 1) {
            i--;
            ans = BigInt(ans) * BigInt(i);
        }
        console.log(ans.toString())
        return ans.toString();
    }