Gennady Korotkevich's submission of One Pile | CodeChef