7. If $n$ is a perfect square or the distance from $n$ to its nearest perfect square is a perfect cube, then $n$ is called a "good number". For example, $145^{2}-2017 \mid=2^{3}$, so 2017 is a good number. For a positive integer $N$, let $S(N)$ be the number of good numbers in the set $\{1$, $2, \cdots, N\}$.
(1) Find $S(2018)$;
(2) Does there exist positive real numbers $\alpha, \beta$ such that
$$
\lim _{N \rightarrow \infty} \frac{S(N)}{N^{\alpha}}=\beta ?
$$
7. (1) For positive integer $n, n^{2}$, the perfect square to the left of $n^{2}$ is $n^{2}-2 n+1$, and the perfect square to the right of $n^{2}$ is $n^{2}+2 n+1$.
Thus, the nearest perfect square to the integers in the interval $\left[n^{2}-n+1, n^{2}+n\right]$ is $n^{2}$.
Let $[x]$ denote the greatest integer not exceeding the real number $x$.
Let $s=[\sqrt[3]{n-1}], t=[\sqrt[3]{n}]$.
Then the good numbers in the interval $\left[n^{2}-n+1, n^{2}+n\right]$ are $n^{2}, n^{2}-1^{3}, n^{2}-2^{3}, \cdots, n^{2}-s^{3}, n^{2}+1^{3}, \cdots, n^{2}+t^{3}$.
Therefore, the number of good numbers in the interval $\left[n^{2}-n+1, n^{2}+n\right]$ is $1+[\sqrt[3]{n-1}]+[\sqrt[3]{n}]$.
Notice that, $44^{2}\int_{0}^{\lfloor\sqrt{N}]} \sqrt[3]{x} \mathrm{~d} x \\
>\int_{0}^{\sqrt{N}-1} \sqrt[3]{x} \mathrm{~d} x=\left.\frac{3}{4} x^{\frac{4}{3}}\right|_{0} ^{\sqrt{N}-1} \\
=\frac{3}{4}(\sqrt{N}-1)^{\frac{4}{3}}=\frac{3}{4} N^{\frac{2}{3}}\left(1-\frac{1}{\sqrt{N}}\right)^{\frac{4}{3}}, \\
\text { then } \frac{3}{2} N^{\frac{2}{3}}\left(1-\frac{1}{\sqrt{N}}\right)^{\frac{4}{3}}-5 \sqrt{N}<S(N) \\
<\frac{3}{2} N^{\frac{2}{3}}\left(1+\frac{2}{\sqrt{N}}\right)^{\frac{4}{3}}, \\
\frac{3}{2}\left(1-\frac{1}{\sqrt{N}}\right)^{\frac{4}{3}}-5 N^{-\frac{1}{6}}<S(N) \div N^{\frac{2}{3}} \\
<\frac{3}{2}\left(1+\frac{2}{\sqrt{N}}\right)^{\frac{4}{3}}. \\
\end{array}
$$

Therefore, there exist positive real numbers $\alpha, \beta$ such that
$$
\lim _{N \rightarrow \infty} \frac{S(N)}{N^{\alpha}}=\beta\left(\alpha=\frac{2}{3}, \beta=\frac{3}{2}\right) .
$$