为什么
-4%5 => 1 //I understand
-5%5 => 0 //I understand
-6%5 => 4 // My mind has been deleted
我在c / cpp中检查过,结果只有-1。
答案 0 :(得分:1)
-6
:最小数字小于或等于-6
并且可以被5
整除-10
。
# just like the other examples
-4 - (-5) == 1
-5 - (-5) == 0
-6 - (-10) == 4 # fits perfectly in there
-7 - (-10) == 3
-8 - (-10) == 2