Solution (source code)

= Solution

For a <divisor on an algebraic curve> $D$ on a smooth projective curve $C$ of <geometric genus> $g$, and a <canonical divisor> $K_C$, the <Riemann-Roch theorem> states
$$
\boxed{\ell(D)-\ell(K_C-D)=\deg D+1-g.}
$$