euler: Simplify problem 2

Signed-off-by: Aleksi Pitkäjärvi <aleksi.pitkajarvi@valotrading.com>