4. A set containing three real numbers can be represented as $\left\{b, \frac{b}{a}, 0\right\}$, or as $\{a, a+b, 1\}$, then the value of $a^{2018}+b^{2018}$ is $\qquad$ .
Huiying 2.
Analysis From the given condition, we know that $a \neq 0$. By the equality of sets, we can get $a+b=0$, thus obtaining $\frac{b}{a}=-1$, so $a=-1$, and $b=1$. Therefore, $a^{2018}+b^{2018}=(-1)^{2018}+1^{2018}=2$.