You are viewing a single comment's thread. Return to all comments →
Python 3
def kangaroo(x1, v1, x2, v2): if v1 == v2: return 'NO' else: meet_jump_n = (x2 - x1)/(v1 - v2) if (meet_jump_n % 1 == 0) & (meet_jump_n > 0): return 'YES' else: return 'NO'
Number Line Jumps
You are viewing a single comment's thread. Return to all comments →
Python 3