Solution for https://www.hackerrank.com/contests/projecteuler/challenges/euler009
merging