3 ms·
Both are correct from math POV, but they differ in how "integer division" works. Python floors `7 // -5` to -2, C rounds `7 / (-5)` to -1.
by danbst 5y ago
Both are correct from math POV, but they differ in how "integer division" works.
Python floors `7 // -5` to -2, C rounds `7 / (-5)` to -1.