Both are the same problems with different statements.
Will you please explain , how?
Exactly. I literally just copy pasted my code from that question and made 7 lines of alterations, after which it was accepted.
@akhan_1271 same concept, to minimize just increment the lowest among the three and be wary of the infinite loop condition in one possible test case.
Yep, confirming as well, it is the same idea. But maybe it is ok, because it is not so obvious, so you still need to think about the problem before just copy-pasting.