CodeChef Starters 142 Solution Discussion (finished)