Ad
  • Custom User Avatar

    I don't think it's a browser issue. For some reason, it's displayed as 109 in a trainer URL (kata/abcd/train/your_language), but as 10⁹ in the main kata page (kata/abcd/). It goes back to 10⁹ if you select another language while in the trainer (probably because the markdown gets re-parsed in case there are conditional code blocks etc.). This happens to me on both Firefox and Chromium. Perhaps using pure Markdown like `$10^9$` would work better

  • Custom User Avatar

    Yes, I see it as 10 to the power of 9 in Chrome. If you inspect the code, it's written as 10<sup>9</sup> Maybe the problem is it's also inside some <code>tags and Edge can't process that?

  • Custom User Avatar

    I agree with you that 10 to the power of 9 is equivalent to 1e9.

    Is it displayed as 10 to the power of 9 on your browser?

    On my browser (latest version of Edge) it is literally disaplyed as the number 109.

  • Custom User Avatar

    3 < n < 109

    1e9 and 109 are equivalent.

  • Custom User Avatar

    The instruction should be updated:

    Currently it says:
    3 < n < 109

    But I think you actually meant:
    3 < n < 1e9

  • Custom User Avatar

    Values will always be >= 1.

  • Custom User Avatar

    Is it expected to handle negative year cases (i.e. BC) or the case for zero? I think there are no description about this and the examples are all positive years :-)

  • Custom User Avatar

    Yes, but with meaningful method and parameter names like race, v1, v2 and g and no tests covering int overflows I personally wouldn't expect foolproof solutions here. ;-)

  • Custom User Avatar

    That test expects more than just that the result be an empty list. It expects it to be the exact same empty list that was at the end of the list '(a)'.

    Saved me from hours of debugging/testing.
    Thank so much! That's it :)

  • Custom User Avatar

    Apologies for the delay.

    It appears the second issue was because I have a wrong IDE settings and thus it complained about the syntax.

    You said that the code doesn't compile but you passed.

    Actually I just meant I had to reset the static variables I used for each test case (which looked a bit ugly) - maybe there are better solutions which I did not know.

    So yea, please feel free to mark it as resolved and thanks for the Kata you have created.

  • Custom User Avatar

    No answer so I consider the issue as resolved.

  • Custom User Avatar

    Sorry but I don't understand your problem. I just tried a few solutions (yours included) and they work. I don't see any "Reserved word 'function' used as name" The tests have the same form as my other TS translations that you passed. Why is static problematic? You said that the code doesn't compile but you passed.
    Please could you be more precise?

  • Custom User Avatar

    The TypeScript translation of this Kata is quite problematic:

    1. "static" (maybe this only applies to TypeScript translation) does not plays well between test cases - locally my test using mocha framework would work - but the exact test cases failed during submission
    2. The given code actually does not even compile due to "Reserved word 'function' used as name".
  • Custom User Avatar

    Site appears to be down again :(

  • Custom User Avatar

    Same here - would have upvoted if it weren't for that.

    I think that "type casting" alone deserve a seperate Kata and should not be mixed with this Kata.

    Anyway thanks for the Kata - the "can be called infinitely" part is quite challenging. :)

  • Loading more items...