P34#solveNaive is correct but slow