problems from projecteuler.net, done in C++