• + 0 comments

    ^ This info should be given in the problem description imo.

    I'm surprised at how bad the problem descriptions are here sometimes. I've failed tests so many times because the description was unclear or didn't mention certain restrictions etc. Also, why aren't all tests free to see? (ノಠ益ಠ)ノ彡┻━┻

    Sorry, I digress... Rant over.

    Here's my oneliner solution to the problem in JavaScript (using recursion):

    const BigNumber = require('bignumber.js')
    
    const extraLongFactorials = (n, f = new BigNumber(1)) => n === 1 ? console.log(f.toFixed()) : extraLongFactorials(n - 1, f.times(n))