[…] long-division algorithm to find the remainder mod(N,d). The only tricky part is that you need to use the INPUT function to convert the digits in the dividend […]