• "So, as long as the integers and their sum are never larger than 53 bits in magnitude..." "a and b will always be valid integers." , so a and b they always safe or not?

  • As future reference, functions returning mixed types (boolean/number) is generally considered an antipattern.

  • a and b will always be valid integers.

    That was not the case, maybe you need to edit the discription a bit. User have to check if inputs are still safe.

  • I got the same error because i was attempting to print the arr while testing my solution. Once I removed the print the kata worked without issue.

  • That's looking much better.

    As a minor point, there are three conditions that can lead to a false result, and you're probably testing only one of them with these test cases. (a+b, and not a or b individually.) For completeness, the random tests should probably have possibilities for any and all of a, b and a+b to be out of bounds, or not. But for a 7kyu kata, this should suffice to weed out the likes of Hacker Sakana and me. :]

    Thanks!

  • Thanks, I think I fixed the random tests.

  • This is not the way to do random tests. The answer has to be random, not just the arguments. Run random arguments through a reference solution and compare the user answer to that answer, don't just pick random arguments that lead to a predictable answer anyway.

  • I see a test where r=6 and the answer is Sheldon, as expected. Not sure where you are seeing what you are seeing. I solved in JavaScript, maybe there is an error in a different language.

  • "IIV" is correct roman numeral format. To represet three you would use "III"

  • Its wrong.
    solution("IIV") return 2 instead of 3.

  • It's about time that I learn how to deal with big integers in Javascript. Can anybody point me in the right direction for learning the best way?

    I'm not asking anyone to solve this for me, just point me in the right general direction for learning how to deal with very large numbers in Javascript.

  • Added a three random test cases.

  • Needs random test cases

  • This comment is hidden because it contains spoiler information about the solution

  • Please reread the instructions. You are looking for the number which is not like all the other numbers in the string in terms of evenness or oddness. In other words you are looking for the single odd number or the single even number.

    eg:
    iqTest("1 2 1 1") => 2 // Second number is even, while the rest of the numbers are odd

  • Loading more items...