991
The following program simulates long division taking the digits 2 at a time, but only keeps track of the remainder.
digits = 4018
location = 0
remainder = 0
while digits>0:
divisor = remainder*100 + 23
remainder = divisor % 999
location += 2
digits = 2
print(location,remainder)
Output: 4018 991

Also note that the remainders follow a repeating pattern of period 27.
(but if you did this one digit at a time, I expect the cycle would be of period 54)

Posted by Larry
on 20191118 08:11:17 