Take the ring torus with minor radius and major radius . With angular coordinate around the generating circle, its Gaussian curvature is
and hence
Thus the displayed condition holds, while every has genus one and is not diffeomorphic to the sphere.