Suppose that $f(z)$ is a holomorphic function on all of $\mathbb C$. Assume that there are constants $A>0$ and a non-negative integer $k$ so that $$ \int_0^{2\pi}|f(re^{i\theta})|d\theta\le Ar^k $$ for all $r>0$. Prove that $f(z)=Cz^k$ for some constant $C$.
My attempt:
Note that $$2\pi|f(0)|\le\int_0^{2\pi}|f(re^{i\theta})|d\theta\le Ar^k$$ for all $r>0$, we have $f(0)=0$. If we can show that there exists $C$ such that $$g(z):=\begin{cases}\frac{f(z)}{z^k},&z\ne 0 \\ C,& z=0\end{cases}$$ is bounded and holomorphic on $\mathbb C$, then we are done. I was going to imitate the proof of Schwarz Lemma, but then I got stuck since $k$ can be less than $1$ which probably makes the limit $\lim_{z\to 0}\frac{f(z)}{z^k}$ go to infinity. So how to move on?