已知m是整数,方程组x-3y=6,6x+my=26有整数解,求M值
问题描述:
已知m是整数,方程组x-3y=6,6x+my=26有整数解,求M值
如题
答
>> [x,y]=solve('x-3*y=6','6*x+m*y=26') x = (6*m + 78)/(m + 18)y = -10/(m + 18)即x=6-3*(10/(m+18)),y=-(10/(m+18))由于x,y为整数,所以m+18=-1,1,-2,2,-5,5,-10,10故m为-19,-17,-20,-16,-23,-13,-28,-8不难 但...