x-y=5,y-z=2
相加
x-z=7
x²+y²+z²-xy-yz-xz
=(2x²+2y²+2z²-2xy-2yz-2xz)/2
=[(x²-2xy+y²)+(y²-2yz+z²)+(z²-2xz+x²)]/2
=[(x-y)²+(y-z)²+(x-z)²]/2
=(25+4+49)/2
=39
x-y=5,y-z=2
相加
x-z=7
x²+y²+z²-xy-yz-xz
=(2x²+2y²+2z²-2xy-2yz-2xz)/2
=[(x²-2xy+y²)+(y²-2yz+z²)+(z²-2xz+x²)]/2
=[(x-y)²+(y-z)²+(x-z)²]/2
=(25+4+49)/2
=39