The Power Sum Hackerrank Solution