One of the important factors to consider when dealing with probability distribution questions is to understand the process that generates the samples. The reason why this is important is that before a particular probability distribution is applied you have to ensure that the assumptions upon which the probability distribution rely are met.
In this instance, a random number generator samples from 10 digits: 0 - 9 (both inclusive). It is reasonable to assume that each digit is equally likely to occur and that future digits generated by the random number generator are independent of the past digits.
Does this help in narrowing down the nature of the distribution on which this process is generated? Furthermore, think about the assumptions underlying the negative binomial distribution and see if they fit the nature of this process.