CodeChef Starters 146 Solution Discussion (finished)