Adding solution to Project Euler P89.