Project Euler Hackerrank Solution Cpppp