Solution (source code)

= Solution

For a positively oriented simple closed piecewise smooth curve, a point $a$ inside it and a function $h$ <holomorphic> on a neighborhood of the curve and its interior, Cauchy's differentiated integral formula is
$$
\boxed{h^{(m)}(a)=\frac{m!}{2\pi i}\int_\gamma\frac{h(z)}{(z-a)^{m+1}}dz\quad(m\ge0).}
$$
\b[The printed denominator uses $n+1$ while the <derivative> and factorial use $m$.] The standard formula requires these indices to agree; the intended exponent in this display is $m+1$. The private transcription preserves the mismatch exactly.

For the following task, write $f(z)=zq(z)$ near zero with $q(0)=f'(0)\ne0$. Thus $H(z)=(z/f(z))^n=q(z)^{-n}$ extends holomorphically at zero, and is <holomorphic> inside the specified contour because $f$ has no other zeros there. Now $f(z)^{-n}=H(z)/z^n$. Apply the correctly indexed formula with <derivative> order $n-1$ to get
$$
\boxed{\int_\gamma\frac{dz}{f(z)^n}=\frac{2\pi i}{(n-1)!}\left[\frac{d^{n-1}}{dz^{n-1}}\left(\frac z{f(z)}\right)^n\right]_{z=0}.}
$$
Positive winding one supplies the orientation and multiplicity used in this expression.