project Euler solutions in c++