Let n has decimal expression `a b c d e , ` i.e. `n = e + 1 0 d + 1 0 0 c + 1 0 0 0 b + 1 0 0 0 0 a , ` then the decimal expression of `m ` is `a b d e , ` i.e. `m = e + 1 0 d + 1 0 0 b + 1 0 0 0 a .`

This way, `n / m = 1 + ( 1 0 0 c ) / ( e + 1 0 d + 1 0 0 b + 1 0 0 0 a ) , ` which should be integer. Because it is given that `n ` is 5-digit, `a ` cannot be zero. Then the denominator is at least `1 0 0 0 0 ` while the numerator is at max `9 0 0 .`

Thus, the only possibility for `n / m ` to be an integer is to have `c = 0 ,` and it is the sufficient condition, too.

There are many such numbers `n ` (actually, `9 * 10 * 10 * 10 = 9000`), they all have the form `ab0de ` (`a ne 0`).