algorithms exercises from project euler