Last active
December 17, 2017 11:13
-
-
Save empeje/6caaee82878f44d121ef6f408c53e68c to your computer and use it in GitHub Desktop.
[SNIPPET-17] Codility - Frog Jump
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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