Long division cryptarithm - KLMN/HIJ = K

The problem statement:

Solve the following long division problem. Each letter represents a unique digit (0-9)

             K
_______
H I J |K L M N
O P I Q
--------
O K L


Source: Dell Magazine

My attempt to solve it:

I have managed to break the problem down into two equations as shown but I'm not sure if this is how I should be proceeding. There are too many unknowns to be solved with two equations alone. Perhaps there should be an equation that represents the constraint that each variable is unique.

From the division, 2 equations are possible

K x (100H + 10I + J) = (1000 x O) + (100P) + (10I) + (Q)

And

1000 x (K - O) + 100 x (L - P) + 10 x (M - I) + (N - Q) = O x 100 + 10K + L

• Welcome to Puzzling.SE! Where did you find this puzzle? Also, please don't post the same question on multiple Stack Exchange sites. Dec 20, 2020 at 19:47
• The usual approach on these is to consider facts about single digit operations and how they constrain the solution. $O$ has to be one less than $K$ because there is no digit in the remainder. There are $10$ different letters, so all digits appear. Zero can only be $I,M,N$. It can't be $H,K,O$ because they start numbers. It can't be $L,Q$ from the ones column subtraction. It can't be $P$ because $P$ has to be greater than $L$ to borrow. It can't be $J$ because we would have $J$ in the ones digit of the product. Dec 20, 2020 at 22:00
• @RossMillikan yes that is correct. I have managed to figure out a little bit more but I am still stuck. So H must be larger than K, as the quotient starts from the ones unit and not the tens unit. Hence, K cannot be 9 because 9 is the largest digit. K can neither be 1 because 1 times HIJ is HIJ. Since K=O+1, O cannot be 8 nor 9. If L is borrowing from K, then P must be bigger than L. Since, L can't be zero P can't be 1, and since O can't be 9 nor 8, then P can't be 2 either because then L would have to be 1. Dec 20, 2020 at 23:59

         7
______
934 ) 7210
6538
----
672

(H, I, J, K, L, M, N, O, P, Q) = (9, 3, 4, 7, 2, 1, 0, 6, 5, 8)

Some reasoning (for the equations, $$KL$$ denotes digit concatenation; all multiplications use explicit $$\times$$):

$$L \ne 0$$, since otherwise $$N=Q$$ from the lowest digit. Let's say $$KL + IQ = bMN$$ where $$b\in\{0,1\}$$. Then $$OP + O + b = KL$$. We know that $$K = O + 1$$ and $$L \ge 1$$, so $$OP + O + b = 10\times(K-1) + P + O + b = KL = 10\times K + L \\ P + O + b = L + 10 \\ P + O = L + 10 - b \ge 10$$ If we plug in various values of $$K$$ into $$HIJ \times K > OP00$$, we get $$HIJ \times 2 > 1900, HIJ \times 3 > 2800, \dots, HIJ \times 8 > 7300$$ and in all cases, $$H=9$$ and $$I\ge 1$$.

Now let's say $$IJ \times K = xIQ$$ where $$1 \le x \le I$$. ($$x$$ cannot be 0 because $$I$$ is nonzero and $$K > 1$$.) Then we can say $$OP = H \times K + x = 9 \times K + x$$. If we plug it back into $$OP + O + b = KL$$, we get $$9\times K + x + (K - 1) + b = KL \\ L = x + b - 1$$

At this point, let's assume $$b=0$$. As Ross Millikan pointed out (and we found $$I\ne 0$$), the zero must be either $$M$$ or $$N$$. But if $$b=0$$, $$KL + IQ = MN$$, so $$M\ne 0$$ and subsequently $$N=0$$. We can find out the following: $$L = x-1 \\ KL + IQ = M0 \Rightarrow L+Q=10, K+I+1=M \\ L = x-1 \Rightarrow x+Q=11 \\ Q \le 8 \Rightarrow x \ge 3 \\ M \le 8 \Rightarrow K+I \le 7$$ Now, $$IJ \times K = xIQ > 300$$, but any choice of $$K$$ and $$I$$ subject to $$K+I \le 7$$ cannot satisfy $$IJ \times K > 300$$. Therefore $$b=1$$.

Plugging in $$b=1$$ to $$L=x+b-1$$, we simply get $$L=x$$, and we can write $$IJ \times K = LIQ$$. Under the constraint that no digits in the equation can be 0 or 9 and the five digits $$JKLIQ$$ are unique, I decided to brute-force the equation and found four candidates: $$34 \times 7 = 238, 67 \times 4 = 268, 72 \times 8 = 576, 83 \times 7 = 581$$ With two additional conditions that $$O=K-1$$ and $$P=10-K+L$$ are also unique, only the first one survives, and gives the final answer.

EDIT: if you start with $$O=K-1$$ and $$P=10-K+L$$ combined with $$\{O,P,J,K,L,I,Q\} \subset \{1,2,3,4,5,6,7,8\}$$, you can actually work out the brute force by hand:

K = 2: O = 1, P = 8+L, impossible
K = 3: O = 2, P = 7+L, PL = 81, IJ×3 = 1IQ, {IJQ}⊂{4567} but no Q for any J
K = 4: O = 3, P = 6+L, PL = 71 or 82
IJ×4 = 1IQ, {IJQ}⊂{2568}: I=2, impossible
IJ×4 = 2IQ, {IJQ}⊂{1567}: Q=6, impossible
K = 5: O = 4, P = 5+L, PL = 61, 72, or 83
IJ×5 = LIQ: impossible
K = 6: O = 5, P = 4+L, PL = 73 or 84
IJ×6 = 3IQ, {IJQ}⊂{1248}: impossible
IJ×6 = 4IQ, {IJQ}⊂{1237}: Q=2, J=7, impossible
K = 8: O = 7, P = 2+L, PL = 31, 42, 53, 64
IJ×8 = LIQ: 4J×8 = 34Q, {JQ}⊂{126}, impossible
K = 7: O = 6, P = 3+L, PL = 41, 52, or 85
IJ×7 = 1IQ: impossible
IJ×7 = 2IQ: 3J×7 = 23Q, 34×7 = 238
IJ×7 = 5IQ: I>=8 but P=8, so impossible