Solution (source code)

= Solution

For a nonconstant <holomorphic map> of degree $d$ between compact connected <Riemann surfaces>, the <Riemann-Hurwitz formula> is
$$
\boxed{2-2g_X=d(2-2g_Y)-\sum_{p\in X}(e_p-1).}
$$
Here $e_p$ is the <local degree>, characterized by local coordinates in which the map is $z\mapsto z^{e_p}$. The sum is finite and its terms are nonnegative; a <ramification point> has $e_p>1$.