find total integer solutions for $(x-2)(x-10)=3^y$ I found this questions from past year maths competition in my country, I've tried any possible way to find it, but it is just way too hard.

How many integer solutions ($x$, $y$) are there of the equation $(x-2)(x-10)=3^y$?
(A)1 (B)2 (C)3 (D)4 (E)5

If let $y=0$, we had
$$x^2 - 12x + 20 = 1$$
$$x^2 - 12x + 19 = 0$$
no integer solution for x
let $y=1$, we had $x^2 - 12x + 17 = 0$, no integer solution too.
let $y=2$, we had $x^2 - 12x + 11 = 0$, we had $x = 1, 11$.
let $y=3$, we had $x^2 - 12x - 7 = 0$, no integer solution.
let $y=4$, we had $x^2 - 12x - 61 = 0$, no integer solution.
and going on....
is there any other efficient way to find it? "brute-forcing" it will wasting a lot of time.
 A: Since their product is a power of $3$, both $x-2$ and $x-10$ must be powers of $3$, perhaps with minus signs (as Andre Nicolas pointed out). Note, however, that $x-2$ and $x-10$ cannot simultaneously be divisible by $3$. The only power of $3$ which is not divisible by $3$ is $1$, hence we must have that $x-2 = \pm 1$ or $x-10 = \pm 1$.
With this in mind, there are four values of $x$ to try: $1, 3, 9,$ and $11$. Two of these give you integer solutions to the equation.
A: By the Fundamental Theorem of Arithmetic, $x-2$ and $x-10$ must be powers of $3$, so we may write $$x-2= \pm 3^a $$ and $$x-10 = \pm 3^b.$$ Substracting the latter from the former we get $$8=\pm 3^a\mp3^b \\ 2^3 =3^a(\mp3^{b-a}\pm1)= 3^b (\pm3^{a-b} \mp1),$$ whence, again by FTA, $(a,b)= (0,2),( 2,0)$ and thus $(x,y)= (1,2),(11,2)$ are the only pairs of integer solutions.
A: Just as  Bob1123 commented, compute the discriminant for the equation $$x^2-12 x+(20-3^y)=0$$ and the roots $$x_{1,2}=6\pm\sqrt{3^y+16}$$ So $(3^y+16)$ must be a perfect square.
I only see one which is possible what you already found ($y=2$).
Now, to prove that this is the unique solution is beyond my skills. Fortunately, you have Alex G.'s nice answer.
