Skip to content

Instantly share code, notes, and snippets.

@shounaklohokare
Created December 16, 2020 15:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shounaklohokare/e5b6a82a5dca97212cbcbfb2f64d4775 to your computer and use it in GitHub Desktop.
Save shounaklohokare/e5b6a82a5dca97212cbcbfb2f64d4775 to your computer and use it in GitHub Desktop.
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