用 factorization 的方法来解决这道题。
2(x+y)=xy
2x+2y=xy
xy-2x-2y=0
xy-2x-2y+4=4
(x-2)(y-2)=4
=1✖️4
=2✖️2
=(-1)✖️(-4)
=(-2) ✖️(-2)
When x-2= 1, y-2= 4, then x=3, y=6.
When x-2=4, y-2=1 , then x=6, y=3.
When x-2=2, y-2= 2, then x=4,y=4.
When x-2=-1, y-2=-4, then x=1, y=-2. (not applicable, y is not a positive integer)
When x-2=-4, y-2=-1, then x=-2, y=1. (not applicable, x is not a positive integer)
When x-2=-2, y-2=-2, then x=0, y=0. (not applicable, x and y is not a positive integer)
(x,y)=(3,6), (6,3), (4,4)