Consider the array of partial sums si = (a1 + a2 + … + ai) % N, (1 ≤ i ≤ N). Clearly, this array contains exactly N values between 0 and N-1.
If there exists an index i such that si = 0, then we can construct our subset by choosing all elements aj (1 ≤ j ≤ i). Otherwise, it follows from Dirichlet's principle that at least one value occurs multiple times. Denote by i and j two indices such that i < j, si = sj. Then we can construct our subset by choosing all elements ak (i < k ≤ j).
Note that this solution proves another property of the problem: besides the fact that any array of size N contains at least one subset whose sum is divisible by N, it also contains at least one such subset that is also a continuous subsequence of the array.