Bus-number game

I'm not sure of the origin of this game, but i was taught it by my brother one day on the bus. Here (and i presume most places) the buses have a unique 4 digit id number. The game is as follows:

Using all digits once, find a sequence of operations that result in ten[1]

While not too difficult, it's a fun little ritual for riding public transport. But it raised an interesting question, how many of the numbers from 0000 to 9999 are solvable? I'm not particularly good at algorithm design (or maths for that matter), so i figured this'd be a good little exercise to boost my skills.

for i in range 10:

  1. I'm aware of variants that use other numbers like 24 ↩︎