you forgot to modulo B by the boundary which is crucial in case B overflows the border
2 Likes
you forgot to modulo B by the boundary which is crucial in case B overflows the border