Official algorithmic problem description and constraints.
Kmes has written three integers π, π and π in order to remember that he has to give Noobish_Monk πΓπΓπ bananas.
Noobish_Monk has found these integers and decided to do the following at most 5 times:
For example, if π=2, π=3 and π=4, then one can increase π three times by one and increase π two times. After that π=5, π=5, π=4. Then the total number of bananas will be 5Γ5Γ4=100.
What is the maximum value of πΓπΓπ Noobish_Monk can achieve with these operations?
Detailed video explanations, mathematical intuition, and clean C++ implementation code.