6、If x and y are integers and xy<>0, what is the remainder when x is divided by y?
(1) when x is divided by 2y, the remainder is 4;
(2) when x+y is divided by y, the remainder is 4;
【答案】B
【思路】(1)X=2Y*K+4 举反例:当Y=4,X=4时,X/Y的余数为0。当Y=3,X=10时,X/Y的余数为1. (2)X+Y=Y*K+4 则X=(K-1)Y+4, 所以X/Y的余数为4
有点想不通,如果说(1)Y=4,X=4,余数为0,那么(2)举反例时也可以Y=4,X=4.余数为0,所以应该是E啊,想不通啊想不通,请明白的筒子赐教呵~~ |