[codility]FrogJmp

Python代码如下:

def solution(X, Y, D):
    # write your code in Python 2.6
    dis = Y-X
    if dis%D == 0:
        return dis/D
    else:
        return dis/D+1
    pass


你可能感兴趣的:([codility]FrogJmp)