Duplicate Problem


#1

Both are the same problems with different statements.


#2

Will you please explain , how?


#3

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.


#4

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.