Solution (source code)

= Solution

Prove the stronger statement with a nonempty <subset>. Order the $n\geq1$ <integers> as $a_1,\ldots,a_n$, and form the <prefix sums>
$$
s_0=0,\qquad s_j=\sum_{k=1}^ja_k\quad(1\leq j\leq n).
$$
There are $n+1$ such sums but only $n$ <residue classes> modulo $n$. The <pigeonhole principle> gives indices $0\leq i<j\leq n$ with $s_i\equiv s_j\pmod n$. Their difference satisfies
$$
s_j-s_i=a_{i+1}+\cdots+a_j\equiv0\pmod n.
$$
The selected elements form a nonempty <subset> of $S$, proving the claim. Neither positivity nor distinct values in a general ordered <sequence> are needed for the <consecutive sum divisible by the sequence length> argument; distinctness merely makes the present input a <set>.