6. Given positive integers $m, n$. Find the smallest integer $N (N \geqslant m)$: if an $N$-element integer set contains a complete residue system modulo $m$, then it has a non-empty subset whose elements sum to a multiple of $n$.
（Zhai Zhenhua, problem contributor）
6. $\left.N=\max \left\{m, m+n-\frac{1}{2} m[m, n)+1\right]\right\}$

First, prove:
$N \geqslant \max \left\{m, m+n-\frac{1}{2} m[(m, n)+1]\right\}$. (1)
Let $d=(m, n), m=d m, n=d n$,
If $n>\frac{1}{2} m(d+1)$, consider a complete residue system modulo $m$: $x_{1}, x_{2}, \cdots, x_{n}$, whose remainders are $m, \uparrow 1,2, \cdots, d$. Such a complete residue system exists, for example, the following $m$ numbers:
$i+d n_{1} j\left(i=1,2, \cdots, d, j=1,2, \cdots, m_{1}\right)$.
Add $k=n-\frac{1}{2} m(d+1)-1$ numbers $y_{1}, y_{2}, \cdots, y_{k}$ that are congruent to 1 modulo $n$, then the set
$A=\left\{x_{1}, x_{2}, \cdots, x_{m}, y_{1}, y_{2}, \cdots, y_{k}\right\}$

contains a complete residue system modulo $m$, but there is no non-empty subset whose elements sum to a multiple of $n$.

In fact, no element in set $A$ is divisible by $n$, so the sum of the smallest positive remainders of the elements of $A$ when divided by $n$ is
$m_{1}(1+2+\cdots+d)+k=n-1$
Thus, there is no non-empty subset in set $A$ whose elements sum to a multiple of $n$.

Therefore, $N \geqslant m+n-\frac{1}{2} m(d+1)$, i.e., equation (1) holds.
Next, prove:
$N=\max \left\{m, m+n-\frac{1}{2} m[(m, n)+1]\right\}$
satisfies the requirement.
Repeatedly use the conclusion: among $k$ integers, there must exist some whose sum is divisible by $k$.
Let these $k$ integers be $a_{1}, a_{2}, \cdots, a_{k}$, and let
$S_{i}=a_{1}+a_{2}+\cdots+a$
If there is an $S_{i}$ divisible by $k$, then the conclusion holds. Otherwise,
there exist $1 \leqslant i\frac{1}{2} m(d+1)$.
At this point, $N=m+n-\frac{1}{2} m(d+1)$.
Let $A$ be an $N$-element set containing a complete residue system modulo $m$: $x_{1}, x_{2}, \cdots, x_{m}$, and another $n-\frac{1}{2} m(d+1)$ numbers.

If $d$ is odd, then by the argument in (1), a complete residue system modulo $m$ can be divided into $\frac{1}{2} m_{1}(d+1)$
$d$-sets. Additionally, the $n-\frac{1}{2} m(d+1)$ numbers can be divided into $n_{1}-\frac{1}{2} m_{1}(d+1)$ groups of numbers, each group containing $d$ numbers, and from each group, one $d$-set can be selected, i.e., from the additional numbers, $n_{1}-\frac{1}{2} m_{1}(d+1)$ $d$-sets can be found. This results in a total of $n_{1}$ $d$-sets.

If $d$ is even, then by the argument in (1), a complete residue system modulo $m$ can be divided into $\frac{1}{2} m_{1} d+\left[\frac{m_{1}}{2}\right]$ $d$-sets.
When $m_{1}$ is even, at least $n_{1}-\frac{1}{2} m_{1}(d+1)$
$d$-sets can be obtained. This results in a total of $n_{1}$ $d$-sets.
When $m_{1}$ is odd, the remaining $\left\{x_{i}\right\}$ is also a
$\frac{d}{2}$-set, resulting in a total of $2 n_{1}-m_{1}(d+1)+1$ $\frac{d}{2}$-sets,
from which at least $n_{1}-\frac{1}{2} m_{1}(d+1)+\frac{1}{2}$ $d$-sets can be selected. This results in a total of $n_{1}$ $d$-sets.
Finally, from these $n_{1}$ $d$-sets, a subset of numbers can be selected whose total sum is divisible by $n_{1} d=n$.