Project Euler #224: Almost right-angled triangles II