assignment 9 code, or project euler 67