Ad
  • Custom User Avatar

    Huh. Very good to know. Thanks!

  • Custom User Avatar

    Ah, my mistake. I thought for a second that "BigInt" was predefined. Now I see your solution more closely.

  • Custom User Avatar

    That speed was not entirely accurate (1300ms for n=2500). But regardless, I timed 13ms on my local environment to calculate factorial(250), and I still time out. Is that entirely too slow, or is there something else responsible for the error I'm getting? What speed should I be shooting for?

  • Custom User Avatar

    How big are the n's they're giving?! My JS code can calculate for n upwards of 2000 in a couple milliseconds, but when I 'ATTEMPT' on here, I pass all the tests, but it keeps giving me an error because it times out.