modulo operation with negative numbers in python

前端 未结 0 502
清歌不尽
清歌不尽 2020-12-09 05:29

I found this definition for modulo

mod(a, n) = a - n * floor(a / n)

Doing an integer division and then multiplying it a

相关标签:
回答
  • 消灭零回复
提交回复
热议问题