You are viewing a single comment's thread. Return to all comments →
I think this is an easier solution N it works for all the cases
if((x1<x2) && (v1<v2)) System.out.println("NO"); else { if((v1!=v2) && ((x2-x1)%(v1-v2))==0) System.out.println("YES"); else System.out.println("NO"); }
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 →
I think this is an easier solution N it works for all the cases