Two grasshoppers on the -axis start at an initial coordinate and start at the same time and hop at a rate of meters/jump and meters/jump respectively. Given the starting locations and movement rates of each grasshopper it is required to find if they'll ever land at the same location.
In the text file is given a set of spaced integers representing the starting locations and movement speed of the grasshoppers, in how many of the cases will they land at the same location?
Details and Assumptions
For the case they will reach each other at .
For the case they will never be able to reach each other. Rd
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
I think the ans would be 208 instead of 10 as per a checking criteria (x2-x1)/(v1-v2) shld be 0 or positive......If I am wrong plzzzz post how to solve