GridCure Interview Question

A math question solvable in any programming language.