• + 2 comments

    solving the equation mentioned above, x1+ y*v1=x2+ y*v2 , we get (x1-x2)/(v2-v1)= y . Since y is number of jumps so it has to be an integer. thus (x2-x1)%(v2-v1)==0