You are viewing a single comment's thread. Return to all comments →
C# solution:
if((v2>v1 && x2>x1)||(v2<v1 && x2<x1) || (v2 == v1 && x2 != x1)||(v2 != v1 && x2 == x1)) Console.WriteLine("NO"); else{ if(Math.Abs(x1-x2)%Math.Abs(v1-v2)==0){ Console.WriteLine("YES"); } else Console.WriteLine("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 →
C# solution: