You should definitely strengthen the test suite. Lots of solutions rely on both diagonals being the same, even though this is not a property of the stated problem.
But you can't rely on x always being a magic square - that's just an accident of the inadequate test suite, isn't it? So although this *looks* like a good solution, it isn't really. I think it's bad practice to take advantage of an inadequate test suite.
4 Comments