a wonderful chocolate

please explain the logic for this problem

Have you gone through its editorial?

2 Likes

thank you so much :slight_smile: