Solution (source code)

= Solution

In a <cyclic group> of <prime> order $p$, a <stabilizer subgroup> has order either one or $p$. The latter case consists exactly of points fixed by all of $G$. Thus the $n$ fixed points each have <ramification index of a holomorphic map> $p$, and every other point has index one. Applying the <Riemann-Hurwitz formula> with <degree of a holomorphic map> $p$ gives
$$
\boxed{2g-2=p(2h-2)+n(p-1).}
$$
Equivalently,
$$
\boxed{g=ph+\frac{(p-1)(n-2)}2.}
$$
The count $n$ concerns fixed points upstairs. Each is its own <group orbit>, so their images are also $n$ distinct <branch values of a holomorphic map>.