How to crack this problem? Can anyone help me with Logic and the code?
I guess the editorial would work :