• + 1 comment

    Looked down at the link "Environment". C++ developers have Boost in their hands. So it boils down to:

    #include <boost/multiprecision/cpp_int.hpp>
    // Complete the extraLongFactorials function below.
    void extraLongFactorials(int n) {
        using boost::multiprecision::cpp_int;
        int multiplier = 1;  
        cpp_int factorial = 1;
        while(multiplier <= n)
            factorial *= multiplier++;
        cout << factorial;
    }
    

    My comment doesn't have any algorithmical value but it might direct to right direction. Don't invent the wheel when someone has done it allready.