If you think about it the right way, that's what everyone is doing: calculating a hash from the problem statement into stream of symbols with certain constraints.
So the problem here is not calculating hash functions per se, but over-fitting the solution to those test cases.
Comments
Fun fact: there has been a problem with Googlers calculating hash functions that pass all the test cases for certain questions.
If you think about it the right way, that's what everyone is doing: calculating a hash from the problem statement into stream of symbols with certain constraints.
So the problem here is not calculating hash functions per se, but over-fitting the solution to those test cases.