Created
August 29, 2018 01:58
-
-
Save juanfurattini/331647d72307cbe50974fab9bf1e3d4f to your computer and use it in GitHub Desktop.
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(a, b, k) | |
return ((b - a) / k) + 1 if a % k == 0 | |
(b / k - ((a / k) + 1)) + 1 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment