Guest User

Untitled

a guest
Nov 25th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. def solution(X, Y, D):
  2. # write your code in Python 3.6
  3. init_count = ((Y-X)//D)
  4. total_d = 0
  5. while True:
  6. total_d = D*init_count
  7. if (total_d+X) >= Y:
  8. break
  9. init_count += 1
  10. return init_count
Add Comment
Please, Sign In to add comment