Skip to content

Instantly share code, notes, and snippets.

@empeje
Last active December 17, 2017 11:13
Show Gist options
  • Save empeje/6caaee82878f44d121ef6f408c53e68c to your computer and use it in GitHub Desktop.
Save empeje/6caaee82878f44d121ef6f408c53e68c to your computer and use it in GitHub Desktop.
[SNIPPET-17] Codility - Frog Jump
def solution(X, Y, D):
# write your code in Python 2.7
gap = Y-X
if gap % D == 0:
return gap / D
else:
return gap / D + 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment