Would forcing the integer result fix this problem? Something like:
def f(a, b, c, d, e, f, g, h, i):
return a + int((13 * b * i + g * h * c) / (i * c)) + d + 12 * e - f - 11 - 10
If I try it like this, I still have the same number of solutions...
Maybe I'm missing something..EDIT: code formatting...
Re:Math puzzle for Vietnamese eight-year-olds
by IanCal on Thursday May 21, 2015 @09:49AM
(#9582707)
No, the problem is the other way around. Keeping them as integers and just using '/' is what's causnig the problem. You can either force them to be floats (not the result, the parameters in the calculation), or you can explicitly look for divisions that have remainders.
However, larger is the difference in how division works.
Python2: 3 / 2 => 1
Python3: 3 / 2 => 1.5