Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为什么 3 模 11 等于 3?编码语法中的表达式通常是
3 % 11
这是 3 除以 11 的余数,对吗?那么结果应该是 11,因为那将是余数。我理解错了什么?
3 / 11 = 0,剩余 3 个。根据定义,任何 n mod m 的答案都不能等于或大于 m。
因为
3 / 11 == 0 3 % 11 == 3 0 * 11 + 3 == 3
0 ------- 11 | 3 | 0 | ------- 3 = Answer