Maximum Multiplication

You will be given three integers a, b and k. You can perform one of the following two operations max…

Click here to read the complete problem statement.


If you need help solving this problem, mention your approach and ask specific questions. Please avoid sharing your code and asking the Community to figure out “what’s wrong”.

cant done the 2nd test case…how it becomes 1089 ??? incrementing 16 times we get a=36…so 36*20=1080 …all test case got ans but except this one…help plz

@LegendHabib Since k = 16, you can perform at most 16 increment operations on a and b. If you increment a 13 times and b 3 times you get a + 13 = 33 and b + 3 = 33. This gives you a * b = 33 * 33 = 1089.

1 Like