Solution (source code)

= Solution

Set $h=f-g$, an <entire function>. By the <Bolzano-Weierstrass theorem>, a subsequence of the distinct zeros $z_i$ converges to a point $a$ in the closed unit disc. An <analytic function> has a convergent <Taylor series> in a neighbourhood of each point. If the first nonzero coefficient of $h$ at $a$ had index $m$, then
$$
h(z)=(z-a)^m k(z),\qquad k(a)\neq0,
$$
with $k$ analytic and nonzero in a sufficiently small disc. The zero $a$ would then be isolated, contradicting the accumulating distinct zeros. All Taylor coefficients at $a$ vanish, so $h$ vanishes on a disc.

To justify continuation across the whole plane, let $Z$ be the set of points at which $h$ vanishes on a neighbourhood. This set is nonempty and open. It is also closed: if points of $Z$ tend to $b$, continuity of each derivative gives $h^{(m)}(b)=0$ for every $m$, and the <Taylor series> at $b$ gives a zero neighbourhood. Since $\mathbb C$ is a <connected space>, $Z=\mathbb C$. This proves the <identity theorem> here and gives $\boxed{f\equiv g}$.

Without boundedness, the distinct zeros need not have an accumulation point in the plane. For example,
$$
\boxed{f(z)=\sin(\pi z),\qquad g(z)=0,\qquad z_i=i\ (i=1,2,\ldots)}
$$
are distinct <entire functions> agreeing at all the indicated positive integers.