Problem 5 solved - brute force & sheer genius