Can anyone explain solution of this?
https://www.codechef.com/submit-v2/PENS
CodeChef Starters 131 Solution Discussion