\(x^2+y^2+z^2+2xy+2yz+2xz+x^2-2x+1+y^2+2y+1=0\)
\(\Leftrightarrow\left(x+y+z\right)^2+\left(x-1\right)^2+\left(y+1\right)^2=0\)
\(\Leftrightarrow\left\{{}\begin{matrix}x+y+z=0\\x-1=0\\y+1=0\end{matrix}\right.\) \(\Leftrightarrow\left\{{}\begin{matrix}z=-\left(x+y\right)\\x=1\\y=-1\end{matrix}\right.\) \(\Rightarrow\left\{{}\begin{matrix}x=1\\y=-1\\z=0\end{matrix}\right.\)
\(\Rightarrow A=1^{2018}+\left(-1\right)^{2018}+0^{2018}=1+1+0=2\)