The numbers $[a],[2 a], \ldots,[N a]$ are distinct from each other, and the numbers $\left[\frac{1}{a}\right],\left[\frac{2}{a}\right], \ldots,\left[\frac{M}{a}\right]$ are also distinct from each other. Find all such $a$.
Answer: $\frac{N-1}{N} \leq|a| \leq \frac{M}{M-1}$. The numbers $[x]$ and $[y]$ are different if and only if the numbers $[-x]$ and $[-y]$ are different. Therefore, it is sufficient to consider the case when $a>0$. If $a<\frac{N-1}{N}$, then among the numbers $[a],[2 a], \ldots,[N a]$ there are coinciding ones, since these $N$ numbers are contained among the $N-1$ numbers $0,1, \ldots, N-2$. Therefore, $a \geq \frac{N-1}{N}$. The same reasoning for the number $1 / a$ shows that $\frac{1}{a} \geq \frac{M-1}{M}$, i.e., $a \leq \frac{M}{M-1}$. We will show that if $\frac{N-1}{N} \leq a \leq \frac{M}{M-1}$, then all the numbers [a], [2a], ..., [Na] are different. Indeed, if $a \geq 1$, then all the numbers [a], [2a], [3a], ... are different, and if $a<1$, then $1-\frac{1}{N} \leq a<1,2-\frac{2}{N} \leq 2 a<2, \ldots, N-1 \leq N a<N$, so $[k a]=k-1$ for $k=1,2, \ldots, N$. For the numbers $[\left.\frac{1}{a}\right],\left[\frac{2}{a}\right], \ldots,\left[\frac{M}{a}\right]$ the reasoning is analogous.