You are viewing a single comment's thread. Return to all comments →
Java8 1 line:
int b = in.nextInt(); int a = in.nextInt(); int d = in.nextInt(); int c = in.nextInt(); System.out.println( b == d || (a-c) != 0 && (((d-b) / (a-c))*a)+b > Math.max(b, d) && ((b-d) % (a-c)) == 0 ? "YES" : "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 →
Java8 1 line: