HackerRank: GCD Product, Gem Stones, Service Lane, Utopian Tree