Project Euler 166 - Criss Cross

Official link: https://projecteuler.net/problem=166