Skip to content

Instantly share code, notes, and snippets.

@clarkdo
Created January 29, 2018 08:22
Show Gist options
  • Save clarkdo/581be58362e60fbaf18998afa32bab80 to your computer and use it in GitHub Desktop.
Save clarkdo/581be58362e60fbaf18998afa32bab80 to your computer and use it in GitHub Desktop.
class Solution {
public int solution(int A, int B, int K) {
return B/K - (A == 0 ? -1 : (A-1)/K);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment