Help needed in a Codeforces Blog

I need help in a problem which I have discussed here .
Any effort is appreciated. :slight_smile: