Project Euler 761 - Runner and Swimmer

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