This is an example of a class of games known as 'Colonel Blotto' games. Wikipedia claims that the paper Roberson, B. (2006), “The Colonel Blotto Game,” Economic Theory 29, 1–24. provides a solution for any number of battlefields and any number of resources, but I haven't independently confirmed this.
Update: In response to zeb's comment below, while it is true that the game described is different than Blotto, it is also the case that, by the symmetric nature of the problem, a strategy will be optimal for either game if and only if the expected number of victories is $n/2$, regardless of the opponent's strategy. So solving Blotto is equivalent to solving the question which was asked.
I also got around to looking at Roberson's paper, and he does indeed solve the problem. He first proves that any distribution which projects to Uniform$[0,2/n]$ in each coordinate will work. Then he constructs such a distribution for any $n$. (Actually he does quite a bit more, since he does not assume that the two players have equal resources.) The details are a bit much to put in an MO post, but anyone interested should check it out; the paper is not very long and not too hard to read.