Lemma 30.17.8. Let $X$ be a quasi-affine scheme. If $H^ p(X, \mathcal{O}_ X) = 0$ for $p > 0$, then $X$ is affine.

Proof. Since $\mathcal{O}_ X$ is ample by Properties, Lemma 28.27.1 this follows from Lemma 30.17.7. $\square$

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).