Ad
  • Default User Avatar

    Tests in JavaScript go beyond MAX_SAFE_INTEGER:

    • last test of theharder tests block:

      Test.assertEquals(solution(200000000), 9333333166666668);
      // 9333333166666668 <-- expected
      // 9007199254740991 <-- MAX_SAFE_INTEGER
      
    • RNG in the random tests:

    const num = ~~(Math.random() * 200000000)