Codility: FrogJmp

Time Complexity: O(N)
Space Complexity: O(1)

from math import ceil

def solution(X, Y, D):
    return ceil((Y - X) / D)