How many non-negative integers less than $10000$ are there such that... I am stuck with the following two problems : 

How many non-negative integers less than $10000$ are there such that the sum of digits of the number is divisible by $3$ ? The options are : 



*

*$\,\,1112\,\,$  2. $\, 2213\,\,$ 3.$\, 2223\,\,$  4.$\,3334\,$ 


My try:  Let $I=[1,9999]$ and:
$$ A = \{n\in I:n\equiv 0\pmod{3}\},$$ 
Then I have to count the number of elements in $A$ and I don't know how to find it?


  
*Let $m$ and $n$ be two positive integers such that such that $m+n+mn=118.$
  Then the value of $m+n$ is 
  



*

*not uniquely determined 

*$\,\,18$

*$\,\,20$

*$\,\,22$ 


I have to determine which of the aforementioned options is correct? 
My Try: As David suggested , $(m+1)(n+1)=119=17 \times 7 \implies (m+1)=17, (n+1)=7 $ and so $m=16,n=6$ so that option 4 is the correct choice.
Can someone explain? Thanks in advance for your time.
 A: For the first question, first note that an integer's digits add up to a multiple of three if and only if the integer itself is a multiple of three.  Furthermore, it can be seen that: 
$$\left|\left\{x~:~1\leq x\leq n~\text{and}~x~\text{is divisible by}~k\right\}\right| = \left\lfloor\frac{n}{k}\right\rfloor$$
Noting that $0$ is also considered non-negative and is not counted in the set above, you see that in your case you have $\lfloor\frac{10000}{3}\rfloor+1=3334$ non-negative integers less than (or less than or equal) to $10000$.
For the second problem, we have $m+n+mn=118$.  Adding one to each side we have $m+n+mn+1=119=(m+1)(n+1)$
Noting that $m$ and $n$ are integers, that implies that $(m+1)$ and $(n+1)$ must then be two factors of $119$.  Considering the prime decomposition of $119=7\cdot 17$ it must be that $(m+1)(n+1)=7\cdot 17$ implying either $\begin{cases}m+1=7\\n+1=17\end{cases}$ or implying $\begin{cases}m+1=17\\n+1=7\end{cases}$
Note: it was also possible that $(m+1)(n+1)=1\cdot 119$ implying $\begin{cases}m+1=1\\n+1=119\end{cases}$ or vice versa, however this possibility is ignored since that would imply either $m$ or $n$ will be non-positive and we were interested only in solutions with positive $m$ and $n$.
In either case we have the same result for $m+n$, namely $m+n=17-1+7-1=22$
