Skip to content

Instantly share code, notes, and snippets.

@juanfurattini
Created August 29, 2018 01:58
Show Gist options
  • Save juanfurattini/331647d72307cbe50974fab9bf1e3d4f to your computer and use it in GitHub Desktop.
Save juanfurattini/331647d72307cbe50974fab9bf1e3d4f to your computer and use it in GitHub Desktop.
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