1. According to the tale "Iliad and One Night," the girl Scheherazade told the king 3 or 5 stories every night. Determine the smallest and largest number of nights in which Scheherazade can tell exactly 1001 stories!
Solution. If $x$ is the number of nights in which Scheherazade told 3 stories, and $y$ is the number of nights in which she told 5 stories, then $3 x+5 y=1001$. One integer solution is $x_{0}=332, y_{0}=1$, so the general solution is $x=332-5 t$ and $y=1+3 t, t \in \mathbb{Z}$. Since

$$
x \geq 0 \Rightarrow 332-5 t \geq 0 \Rightarrow t \leq 66.4
$$

and from

$$
y \geq 0 \Rightarrow 1+3 t \geq 0 \Rightarrow t \geq-\frac{1}{3}, \text { i.e. }-\frac{1}{3} \leq t \leq 66.4
$$

we get

$$
t=0 \Rightarrow x=332, y=1 \text { and } t=66 \Rightarrow x=2, y=199
$$

so the smallest number of nights is $201=2+199$, and the largest is $333=1+332$.