Ad
  • Custom User Avatar

    Thank you! This is not a coding problem, it is simply about knowing the algorithm, which I did not.

  • Default User Avatar

    Yes, this would have saved me a lot of time. All the rest are >=, F is the only one thats just >.

  • Default User Avatar

    Thanks for the Kata!

    I got confused because you say first and last digit when you mean "first (most significant)" and "last (least significant)" digit.

  • Default User Avatar

    The sample test for python does not work. I replaced expect_equals with assert_equals and it needed an extra space in the answer.
    This lead me to believe the submit was broken but it was my code.

    Funny how nobody got a vote for best practices. That just indicates how hard it is.

  • Default User Avatar

    The severs must be getting over loaded. I had to submit my solution a bunch of times before it passed without timing out.

  • Default User Avatar

    When submitting my solution math.log gave me a domain error
    Had to resort to awhile loop instead
    This katta is more about find the math trick than programing.
    Does anyone have a pointer to the math behind this trick?

  • Default User Avatar

    The test case supplied does not work
    There is a trick test case where no arguments are entered.

  • Default User Avatar

    1.01 returns 'F'
    Please add it to the visiable test cases so users don't spend allot of time figuring it out.

  • Custom User Avatar
    1. Please use "mark as having spoiler content" if you post something that contains a solution. Even if the solution is botched.
    2. Comment on the solution itself. Some people only read the solutions and the accompanied comments, and visit the "Discourse" page only for hints.
    3. If possible, tag your comment. This could have been a "suggestion".
    4. It's not possible to change the tests if 500+ warriors have completed a kata. Sorry.
    5. Never promote your own solution, even if it is correct. It usually frowned upon and seems snotty. There are many other solutions which "do the right thing"™, so you could generalize that statement, like "Upvote a correct solution, e.g. <some linksgt;". There is a bunch of solutions which work exactly as you want, but they don't have an upvote either. You could easily raise awareness if you upvote those solutions too – unless you want your solution in particular to rise to the top.

    Hope this helps. Also, I'm not familiar with Python and didn't think about numbers greater than 0xffffffff. At this point I can only change the description and add that Python, Java, Coffeescript, Javascript and Ruby only use 32 bit integers.

  • Default User Avatar

    Mine wasn't passing the fifth test then suddenly is passed.

  • Default User Avatar

    Try these numbers
    print powerof4(1125899906842624)
    print powerof4(1125899906842625)
    the first is 4**25, the second should return false.
    See my solution.

  • Default User Avatar

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