hackerrank ruby enumerable each with index problem solution

welcome to shbcf.ru