We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
function extraLongFactorials(n) {
n = BigInt(n)
var accumulator = BigInt(1)
for (let i = n; i > 0; i--) {
accumulator = accumulator * i
}
console.log(accumulator.toString())
}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Extra Long Factorials
You are viewing a single comment's thread. Return to all comments →
Almost same as mine.