Substract 99q from both sides to obtain,
(N-99 q) = q+r
Now, we need that q+r to be divisble by 11.
Because of equality it is equivalent to saying,
That we need (N- 99q) to be divisible by 11.
But 99q is already divisible by 11.
Thus, we require that N be divisible by 11.
Thus, what the question is really asking is how many 5 digits numbers are divisible by 11.
Let us list all 5 digit numbers in increasing order.
The fist number on this list divisible by 11 is:
And after that each 11-th number is divisble of 11.
Up to 99999
Now, I leave if to you to figure out how many numbers are in that list.