stargazer's submission of Buying a New String | CodeChef