You are viewing a single comment's thread. Return to all comments →
This solution will work for C/C++ because any number other than zero returns false. For Java:
f(v1 > v2 && ((x2-x1)%(v1-v2) == 0)) printf("YES"); else printf("NO");
That will work any case.
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 →
This solution will work for C/C++ because any number other than zero returns false. For Java:
That will work any case.