我发现相同的mod操作会产生不同的结果,具体取决于使用的语言.
在Python中:
-1 % 10
产生9
在C中它产生-1!
c python math modulo
c ×1
math ×1
modulo ×1
python ×1