Solutions to some project euler questions in java