• + 1 comment
    def kangaroo(x1, v1, x2, v2):
        counter = 0
        while counter < 10000:
            x1+=v1
            x2+=v2
            counter+=1
            if x1 == x2:
                return "YES"
                break
            elif counter == 10000:
                return "NO"
    

    i limit permutation on python