jp.jprasanna Wrote:but if one is under time pressure, can we use the below logic
...
no common factors
...
"no common factors" doesn't really help you here.
for instance:
5x + 7y = 47 --> there are two different pairs (x, y) that solve this equation: (8, 1) and (1, 6).
5x + 7y = 48 --> this time, there's only one such pair: (4, 4).
both of these equations have "no common factors", so there goes that theory.
also, it's quite easy to make equations with no common factors that will have tons and tons of solutions, just by picking a really big number for the constant term. for instance, 7x + 3y = 1,000,000,000 doesn't have any common factors among its coefficients, but there will obviously be lots of different pairs of integers that solve it.
if you really, really, really are dying to learn obscure rules that you'll probably never have the chance to use, there's always this: if you have ax + by = c and c > 2ab, then there will always be more than one pair (x, y) that solves the equation.
--
more importantly... in response to this:
Hi - Ron Totally agree with testing cases.
but if one is under time pressure...
on a problem like this one, you should definitely be able to test cases in under a minute. probably under thirty seconds. so this is really a non-issue.
i'm not trying to be a mind reader here, but, in my experience, in 99% of all cases when people say "...but what if it takes too much time?", what the person is
really thinking is, "... but i'm not
used to that strategy! that makes me uncomfortable!"
i bet the same thing is happening here. you've got to expand your repertoire to succeed on this exam.