Hacker Rank Counter Game

Solution to Counter Game
https://www.hackerrank.com/contests/csindia-practice/challenges/counter-game