Let $a_1,a_2,...,a_{n-1}$ be integers. Suppose that there is no subset $S\ne \emptyset$ of $\{1,2,...,n-1\}$ such that $\sum_{k\in S}a_k\equiv 0\pmod{n}$. Show that there exists an integer $a$, $0< a< n$ st $\gcd(a,n)=1$ and $a_1,a_2,...,a_n\equiv a\pmod{n}$.
Source : https://artofproblemsolving.com/community/c6h626708p3759215 (mavropnevma's comment)
My attempt : Let $s_k=a_1+a_2+...+a_k$. Then $s_1,s_2,...,s_{n-1}$ form a permutation of $1,2,...,n-1$ (mod n). Let $s_0=0$ and consider the subscripts mod $n$. Then the condition that $\sum_{k\in S}a_k\ne 0\pmod{n}$ for all $S\subseteq\{1,2,...,n-1\}$ st $S\ne \emptyset$ implies $\sum_{k\in S}s_k \ne \sum_{k\in S}s_{k-1}\pmod{n}$. This is where I'm stuck.
For a subset $S$ of $1\ldots n-1$ let $f(S)= \{ \sum_{j\in T} a_j, \emptyset\subsetneq T\subset S\}$.
Claim: if $i\not \in S$ then $$|f(S \cup i)|\ge |f(S)|+1$$ Proof: $a_i+\sum_{j\in S} a_j$ can't be in $f(S)$, as otherwise we'd have $a_i+\sum_{j\in S} a_j=\sum_{j\in T} a_j$ for some $T\subset S$ so $a_i+\sum_{j\in S,\not \in T} a_j = 0$.
If some $a_j\ne a_1$ then $|f(\{1,j\}|=3$ so that for $1,j\not \in S$: $|f(\{1,j\}\cup S)|\ge 3+|S|$ which gives that $f(\{1,\ldots,n-1\})$ contains the whole of $0\ldots n-1$.