solution project euler scheme