Solution (source code)

= Solution

Apply <Serre duality for compact complex manifolds> to $\mathcal L\otimes K_M$, where $K_M$ is the <canonical bundle>:
$$
H^n(M,\mathcal L\otimes K_M)^*\cong H^0(M,\mathcal L^{-1}).
$$
We can show the group on the right vanishes directly from the embedding. Since $\mathcal L^{-1}=i^*\mathcal O(-1)$, the <tautological bundle> inclusion gives an inclusion of <holomorphic vector bundles>
$$
\mathcal L^{-1}\hookrightarrow M\times\mathbb C^{r+1}.
$$
A global <holomorphic section> of $\mathcal L^{-1}$ consequently determines $r+1$ global <holomorphic functions> on $M$. <Compactness> and the <maximum modulus principle> make these functions constant on every <connected component>. On such a component the section is therefore a constant vector $v$ lying in the tautological line $i(x)$ for every $x$.

If $v\ne0$, all the points $i(x)$ equal $[v]$. This contradicts the fact that $i$ is an embedding of a component of positive dimension $n\geq1$. Hence $v=0$ on every component, and $H^0(M,\mathcal L^{-1})=0$. Duality proves
$$
\boxed{H^n(M,\mathcal L\otimes K_M)=0.}
$$