I found a article online about a 3rd grade math in Vietnam. I guess it would be interesting to see how we can solve this problem. In mathematical or programmatic way.
I wrote a test function for this, feel free to adapt it into any programming language you are comfortable with :
var answer = [1,1,1,1,1,1,1,1,1,1];
var isCorrect = function (answer) {
return ((((((((((((a[0]+13)*a[1])/a[2])+a[3])+12)*a[4])-a[5])-11)+a[6])*a[7])/a[8])-10) === 66;
};
The rule is there should be no repeatable number in the array. Numbers accepted are 1-9.