Olson determined, for each finite abelian p-group G, the maximal length of a sequence of elements of G such that no subsequence has zero sum, thus settling (at least for these groups) a problem raised by Davenport in connection with factorization in number fields. This problem is equivalent to one on simultaneous linear congruences to which one seeks solutions with the variables restricted to the values 0 and 1. In the present note, the analogous problem for forms of arbitrary degree is settled, again with best possible results. The main tool is an extension of Chevalley's theorem on finite fields to congruences modulo prime powers. This in turn is deduced from Chevalley's theorem by a simple device which circumvents the use of Witt vectors.