Untitled

mail@pastecode.io avatar
unknown
python
2 years ago
256 B
4
Indexable
Never
def kangaroo(x1, v1, x2, v2):

    counter = 0
    while x2 < 10000:
        if (x1 == x2):
            print('YES')
            counter = 1
            break
        x1 = x1 + v1
        x2 = x2 + v2

    if (counter == 0):
        print('NO')