C++ and Javascript solutions to Project Euler problems