Solutions to Project Euler problems in Java and Python