Ad
  • Custom User Avatar

    So unfortunately there is an easy way to break this and succeed at all of the tests:
    def wpp(a, b, n):
    if n > b and n > a:
    return []
    if (not a % 2 and not b % 2 and n % 2) or ((not a % b or not b % a) and not n % 2 and n < a and n < b):
    return []
    return [(n, min(a, b))]

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    Honestly it feels like the point of this is to not use multiplication and iteration over what you are given, but that is just my interpritation. This is a great Kata if you work under that idea but it seems most others went about it as finding built ins or other functions to get around the restrictions rather than figruing out the math solution.

  • Custom User Avatar

    So I am passing all the sample tests and everything I do on my own end but it is throwing and index error any time I try and submit?