HackerRank Gem Stones