We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
% means module. If the % !== 0 then (x2-x1) the diference between both start points it's not divisible with (v2-v1) the diference of speed then they never will land on the same spot at the same time. 4%2 is 0 5%2 = 1 because 5/2 is 2*2 + 1
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Number Line Jumps
You are viewing a single comment's thread. Return to all comments →
% means module. If the % !== 0 then (x2-x1) the diference between both start points it's not divisible with (v2-v1) the diference of speed then they never will land on the same spot at the same time. 4%2 is 0 5%2 = 1 because 5/2 is 2*2 + 1