Project Euler Hackerrank Solution Cpp Brakes Location