Ad
  • Default User Avatar

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

  • Default User Avatar

    Lua translation! (author inactive)

  • Default User Avatar

    I pass 631 tests successfully, but there is an error in one. Test 13:
    Expected: '6', instead got: '4'.
    No idea what the problem is...

  • Custom User Avatar

    Buggy solutions are able to pass (JS). Here are some random tests that my solution fails:

    At 685860,261047 - Expected: '0', instead got: '8'
    At 685860,261047,897868 - Expected: '0', instead got: '8'
    At 685860,261047,897868,685984 - Expected: '0', instead got: '8'
    At 685860,261047,897868,685984,977072 - Expected: '0', instead got: '8'
    At 685860,261047,897868,685984,977072,603909 - Expected: '0', instead got: '8'
    At 685860,261047,897868,685984,977072,603909,667425 - Expected: '0', instead got: '8'
    At 685860,261047,897868,685984,977072,603909,667425,163183 - Expected: '0', instead got: '8'
    At 685860,261047,897868,685984,977072,603909,667425,163183,697514 - Expected: '0', instead got: '8'
    At 685860,261047,897868,685984,977072,603909,667425,163183,697514,15784 - Expected: '0', instead got: '8'
    

    Perhaps adding some fixed tests can seal this crack?

  • Custom User Avatar

    Carried over from an issue marked as resolved below which was not really fixed:
    C version

    • Initial solution setup is missing some headers and does not compile
    • assertion messages are pretty much useless: "Failed at random test 1" is unacceptable form of feedback.
  • Custom User Avatar

    Please clarify the constraints for this Kata, it will be really helpful to understand how fierce the test are.

  • Custom User Avatar

    Could someone with > 10k reputation improve the Python tests to kill this invalid solution?

    For example, it returns 1 for [0, 660], but the correct answer would be 0.

    It just happens to pass the tests most of the time, depending on which random numbers come up.

  • Custom User Avatar
  • Custom User Avatar

    Does anyone have a simple explanation of the solution?

    It's clear the exponent has to be calculated using a module multiple of four but I don't understand the maths how this is achieved.

  • Custom User Avatar

    man this one is realy hard for me. I figured, that Euler's theorem needs to be used, but what to do when first number isnt mutualy simple with 10? In that case theorem doesnt work... i feel like i missed something simple, I've been struggling for a couple days now and i really need some hint

  • Custom User Avatar

    Haskell, Swift, and possibly other languages contain laziness test test case, which is not present in other language versions, and brings additional step of difficulty to the task.
    It should be either added to all languages which can handle it (for example, C# does not have it, but could), or be removed.

  • Custom User Avatar

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

  • Custom User Avatar

    Can xn be a negative? If not, it seems to be written in the description.

  • Default User Avatar

    Hi, my solution in Haskell passed all 16 tests, failed 0, but timed out (12000 ms) with an exit code 1. It's a translation from my Python solution using foldr1.

    Could you give some more hint on how to make it lazier as mentioned in the earliest comment in this thread?
    Thanks!

  • Default User Avatar

    I've seen someone saying that Python tests are all correct, but...
    I'm having trouble on a dozen tests with distinctly unexpected error logs... and it's not the case where it switches actual and expected answer!

    e.g.:

    2 should equal 8
    Log
    [937640, 767456, 981242] Start
    [937640, 767456, 981242] treating
    will apend 6 ** 2
    [937640, 36] treating
    will apend 0 ** 4
    final list [0]
    (my answer should be 0, but it sees as 2, and says that it should be 8,wtf?)

    other cases that starts with [338340, 637600, 654608] and boil down to [338340, 0] should expected 1, right? anything powered to zero is one.

  • Loading more items...