dreamaddict's solution should work for other cases. (I know what I'm gonna write below will sound extremely boring for some, but I just couldn't help myself :D) Basically we're trying to get a sum of 0 (mod 10) in the field. So let's say the remainder when you divide the sum of numbers in the field is "a" (so a=8 if the sum is 58), then we need to either get rid of that "a", or find a "10-a" to add the total. In case of inversion for example, you need to find a y which solves a-y+(-y)=0 (mod 10), if your a=8, you can invert a "4" (since 8-4+(-4)=0), or you can invert a "-1" (since 8-(-1)+1=0); in case of division, if you're dividing with, say m, you need to find a number y which solves "a-y+(y/m)=0 (mod 10), and for multiplication (if you have a xm) "a-y+yxm=0 (mod 10). This can be generalized if you have more operations in the field.
I've just finished it. It has potential. Some levels are badly designed. The only hope to finish with zero escapees is purple gem, but it is buggy. The upgrade system is unfair. But still there's stg charming about this game. I still say people should give it a try; it's not perfect, but it is still a good game.
It was good actually, although a little info about the incoming wave would be nice. But I'm also having difficulty about loading. After getting the yellow gem, my battlefield(s) disappeared. I quitted and tried to reload with no luck. I still recommend this one to everyone who likes this type. Btw, I fell in love with the main character.