Solution (source code)

= Solution

The ball volume is
$$
V_n(R)=\frac{\pi^{n/2}R^n}{\Gamma(n/2+1)}.
$$
For $n=2m$ this is $\pi^mR^{2m}/m!$; for $n=2m+1$ it is $2^{2m+1}m!\pi^mR^{2m+1}/(2m+1)!$.