1. Given the sets $A=\{x, x y, x+y\}, B=\{0,|x|, y\}$ and $A=B$, then $x^{2018}+y^{2018}=$
Answer 2.
Analysis From the fact that $B$ has three elements, we know that $x \neq 0$ and $y \neq 0$, so in $A$, $x+y=0$, which means $x=-y$. Also, $\{x, x y\}=\{|x|, y\}$: If $\left\{\begin{array}{l}|x|=x \\ x y=y\end{array}\right.$, then $\left\{\begin{array}{l}x=1 \\ y=-1\end{array}\right.$, in this case $A=\{1,-1,0\}, B=\{0,1,-1\}$; If $\left\{\begin{array}{l}x=y \\ |x|=x y\end{array}\right.$, then $\left\{\begin{array}{l}x=0 \\ y=0\end{array}\right.$, or $\left\{\begin{array}{l}x=-1 \\ y=-1\end{array}\right.$, or $\left\{\begin{array}{l}x=1 \\ y=1\end{array}\right.$, which does not satisfy the distinctness, so we discard it. Therefore, $x=1, y=-1$, so $x^{2018}+y^{2018}=2$.