Skip to content

Instantly share code, notes, and snippets.

@shounaklohokare
Created Dec 16, 2020
Embed
What would you like to do?
def kangaroo(x1, v1, x2, v2):
if x1 < x2 and v1 < v2:
return 'NO'
else:
if v1!=v2 and (x2-x1)%(v2-v1)==0:
return 'YES'
else:
return 'NO'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment