Finite Automata

Answer & solution
Answer: C (no official key was published)
The answer is n+1. For a lower bound, take an accepting computation for w, which has n consuming transitions. If a state repeats at two different consumed-input positions, the nonempty intervening loop can be pumped, accepting a string longer than n. That contradicts the definition of L. Hence at least n+1 states occur. For an upper bound, use states q0,…,qn, all accepting, with q0 initial. For every j=1,…,n add q0 --w[j]--> qj, and for i=1,…,n−1 add qi --w[i+1]--> q(i+1). Every nonempty accepted string follows a contiguous segment of w, and every substring has such a run. Making q0 accepting includes the empty substring. This construction uses one initial state and no epsilon moves; C.
The lower bound applies even when w contains repeated symbols, because the finite language contains w itself but no string longer than n. Pumping a repeated state on that accepting computation would violate this maximum length. In the upper-bound construction, choosing q0→qj chooses the starting position of a substring; continuing along successive positions preserves contiguity, and accepting at any state permits any ending position.