Ad
  • Custom User Avatar

    dices is not a word

  • Custom User Avatar

    These issues [1][2] pointed out that for n = k = 0, the result should be 1.
    However, this did not mean that the result should always be 1 if k = 0, just for the specific case of n = k = 0.
    It is impossible to roll a 0 with a six sided die. outcome(1,6,0) must be 0.

    • there is always exactly 1 case to reach k = 0 regardless of the number of dice you have needs to be removed from the description
    • act(1, 6, 0, 1), act(2, 6, 0, 1), ... need to be removed from the tests
    • The reference solution used in the tests needs to be replaced
    • The behaviour for n = k = 0 should be clarified in the description, like the other issues already stated
  • Custom User Avatar

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

  • Custom User Avatar

    python new test framework is required. updated in this fork

  • Custom User Avatar

    The anti-cheat is an absolute garbage. You can:

    • call my_all and my_any just once outside your function to pass the "use of my functions test"
    • delete redefined functions to return them to their "normal state"

    There're a lot more exploits available like:

    • reduce
    • count
    • converting iterable to array with [*] (Python 3.6)
    • copy the behavior of prohibited functions through non-prohibited functions

    And on top of that, all this stuff is preloaded, so the kata cannot be completed after the CW runner update.


    Based on all these problems, the fact that the author is not active anymore, the fact that the satisfaction rating will never climb high enough to make this kata approvable (and the fact that the whole kata premise is "solve a very basic task in a very stupid and inefficient way"), I removed the 2 final tests checking for my_any and my_all function calls so it at least can be completed, in case anybody will ever stumble upon this trash and tries to solve it (other "anticheats" are still in place, though).

  • Custom User Avatar

    In the middle of the tests suddenly you've changed the max distance to 100, which is completely unexpected and out of specs.

  • Custom User Avatar

    Actually providing a kata based on generator is a good idea but as you group primes, you should definitely allow zip and itertools.zip_longest type and not only pure generators.
    Since Python 3, zip produces also a generator and grouping the way you want is its own purpose.

  • Custom User Avatar

    There are tons of prime number katas, but there is a twist (not much, though), so it should probably not be considered as a duplicate.

    However, there is something wrong - probably with the test cases -, because my attempts time out, even though I pre-generate my list of primes up to 10^7 in about 400ms, and only read from this list thereafter.

    Furthermore, the description should mention that large numbers (up to ???) will be tested, so you need to write an efficient algorithm. This will also affect the ranking of the kata, because it requires more maths and/or coding knowledge, than a simple one where primes are tested up to let's say 1000.

    Oh, and don't forget to add random tests.

    Cheers