3. Find all positive integers $k<202$ for which there exists a positive integer $n$ such that
$$
\left\{\frac{n}{202}\right\}+\left\{\frac{2 n}{202}\right\}+\cdots+\left\{\frac{k n}{202}\right\}=\frac{k}{2},
$$
where $\{x\}$ denote the fractional part of $x$.
Note: $\{x\}$ denotes the real number $k$ with $0 \leq k<1$ such that $x-k$ is an integer.
Solution
Denote the equation in the problem statement as $\left({ }^{*}\right)$, and note that it is equivalent to the condition that the average of the remainders when dividing $n, 2 n, \ldots, k n$ by 202 is 101 . Since $\left\{\frac{i n}{202}\right\}$ is invariant in each residue class modulo 202 for each $1 \leq i \leq k$, it suffices to consider $0 \leq n<202$.

If $n=0$, so is $\left\{\frac{i n}{202}\right\}$, meaning that $\left(^{*}\right)$ does not hold for any $k$. If $n=101$, then it can be checked that $\left(^{*}\right)$ is satisfied if and only if $k=1$. From now on, we will assume that $101 \nmid n$.
For each $1 \leq i \leq k$, let $a_{i}=\left\lfloor\frac{i n}{202}\right\rfloor=\frac{i n}{202}-\left\{\frac{i n}{202}\right\}$. Rewriting (*) and multiplying the equation by 202, we find that
$$
n(1+2+\ldots+k)-202\left(a_{1}+a_{2}+\ldots+a_{k}\right)=101 k .
$$

Equivalently, letting $z=a_{1}+a_{2}+\ldots+a_{k}$,
$$
n k(k+1)-404 z=202 k .
$$

Since $n$ is not divisible by 101 , which is prime, it follows that $101 \mid k(k+1)$. In particular, $101 \mid k$ or $101 \mid k+1$. This means that $k \in\{100,101,201\}$. We claim that all these values of $k$ work.
- If $k=201$, we may choose $n=1$. The remainders when dividing $n, 2 n, \ldots, k n$ by 202 are 1,2 , $\ldots, 201$, which have an average of 101 .
- If $k=100$, we may choose $n=2$. The remainders when dividing $n, 2 n, \ldots, k n$ by 202 are 2,4 , ..., 200, which have an average of 101 .
- If $k=101$, we may choose $n=51$. To see this, note that the first four remainders are $51,102,153$, 2, which have an average of 77 . The next four remainders $(53,104,155,4)$ are shifted upwards from the first four remainders by 2 each, and so on, until the 25 th set of the remainders (99, 150, 201, 50) which have an average of 125 . Hence, the first 100 remainders have an average of $\frac{77+125}{2}=101$. The 101th remainder is also 101 , meaning that the average of all 101 remainders is 101 .

In conclusion, all values $k \in\{1,100,101,201\}$ satisfy the initial condition.