Project Euler Hackerrank Solutions C