Skip to content

Instantly share code, notes, and snippets.

@metallurgix
Created December 8, 2014 18:21
Show Gist options
  • Save metallurgix/c99b1342676b4bf25778 to your computer and use it in GitHub Desktop.
Save metallurgix/c99b1342676b4bf25778 to your computer and use it in GitHub Desktop.
Codility-Lesson 1-Challenge 2
def solution(x, y, d)
if x>y
0
else
((y-x)/d.to_f).ceil
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment