N:Dure wrote:Gotcha! So the other solutions will be like 4 which is 2x2 (doesn't fit), 18 which is 9x2 or 18x1 (doesn't fit)..etc
You are right !
Probably I use some short cuts while posting the solution. Sorry if that make it ambiguous. Actually, I try to solve how I would do in real test.
So, the easiest way would be to solve the quadratic equations :
Equation 1: x*(x-1)/2 = 2 => x*(x-1) = 2 => x^2-x-2 = 0
Now, can when you solve for x, if you get the integral solution for x, then the answer would be right.
Equation 2: x*(x-1)/2 = 6 => x*(x-1) = 12 => x^2 -x -12 = 0
Similarly for the other 3 cases.
Now the short-cut part : when I see x*(x-1), as you might have realized, the trick I used saved me from solving the 5 quadratic equations.
Thanks
Anshu
(Every mistake is a lesson learned )