Solution (source code)

= Solution

Take the <hyperplane divisor> $D=(t_0=0)$. On $U_i=D_+(t_i)$ its local equation is $g_i=t_0/t_i$, a non-zero-divisor; on $U_0$ it is the unit one. Thus it is an <effective Cartier divisor>. On overlaps, $g_i/g_j=t_j/t_i$ is a unit.

The <divisor line bundle> $\mathcal O_X(D)$ is locally generated by $1/g_i=t_i/t_0$. Map this generator to the local generator $t_i$ of the <twisting sheaf on projective space> $\mathcal O_X(1)$. On overlaps both generators transform by $t_i/t_j$, so the maps glue and give
$$
\boxed{\mathcal O_X(D)\cong\mathcal O_X(1).}
$$
For $n=0$ the hyperplane is empty and this is the zero Cartier divisor; the conclusion still holds.