UPSC CSAT 2025 Q29: Cryptarithm Digit Subtraction PQR − PS — Solved

Let PQR be a 3-digit number, PPT be a 3-digit number and PS be a 2-digit number, where P, Q, R, S, T are distinct non-zero digits. Further, PQR − PS = PPT. If Q = 3 and T < 6, then what is the number of possible values of (R, S) ?

  1. 2
  2. 3
  3. 4
  4. More than 4

Answer: (b) 3

Solution

  1. Write each number in place-value form. PQR = 100P + 10Q + R. PPT = 100P + 10P + T = 110P + T. PS = 10P + S. With Q = 3, PQR = 100P + 30 + R.
  2. Substitute into PQR − PS = PPT: (100P + 30 + R) − (10P + S) = 110P + T 90P + 30 + R − S = 110P + T R − S − T = 20P − 30.

  3. Find P. R, S and T are digits from 1 to 9. So R − S − T is at most 9 − 1 − 1 = 7 and at least 1 − 9 − 9 = −17. - P = 1 gives 20P − 30 = −10. This is inside the range. - P = 2 gives 10. This is more than 7, so it is impossible. Larger P is also impossible. So P = 1.

  4. The same result by column subtraction. Write 1 3 R − 1 S = 1 1 T and work from the right. - Hundreds column: P stays P, so the tens column must not borrow. - Tens column: 3 − P (minus any borrow from the units) = P. With no borrow, 3 = 2P has no whole-number solution. With a borrow, 2 = 2P gives P = 1. - So the units column borrows, and R + 10 − S = T.

  5. With P = 1, step 2 gives R − S − T = −10, so S = R + 10 − T.

  6. List the allowed digits. P = 1 and Q = 3 are already used. R, S and T must be distinct, non-zero and different from 1 and 3. So each comes from {2, 4, 5, 6, 7, 8, 9}.
  7. Use T < 6. T cannot be 1 or 3, so T is 2, 4 or 5.
  8. S ≤ 9 means R + 10 − T ≤ 9, so R ≤ T − 1. Check each value of T: - T = 2: R ≤ 1. R = 1 is taken by P. No solution. - T = 4: R ≤ 3. R cannot be 1 or 3, so R = 2. Then S = 2 + 10 − 4 = 8. Check: 132 − 18 = 114. P, Q, R, S, T = 1, 3, 2, 8, 4, all distinct. Valid. - T = 5: R ≤ 4. R can be 2 or 4.

    • R = 2: S = 2 + 10 − 5 = 7. Check: 132 − 17 = 115. Digits 1, 3, 2, 7, 5 are distinct. Valid.
    • R = 4: S = 4 + 10 − 5 = 9. Check: 134 − 19 = 115. Digits 1, 3, 4, 9, 5 are distinct. Valid.
  9. The valid pairs are (R, S) = (2, 8), (2, 7) and (4, 9). These are three different pairs.

Answer: 3

Option-wise explanation

  • a: incorrect — Two pairs is an undercount. It usually comes from checking only one value of R when T = 5. With T = 5, R = 2 (132 − 17 = 115) and R = 4 (134 − 19 = 115) both work, and T = 4 adds (2, 8).
  • b: correct — P must be 1 and the units column must borrow, so S = R + 10 − T. Under T < 6 and the distinct-digit rule, only (2, 8), (2, 7) and (4, 9) are valid: 132 − 18 = 114, 132 − 17 = 115 and 134 − 19 = 115.
  • c: incorrect — This is the distinctness trap. Letting R repeat P or Q adds a fourth case such as 131 − 19 = 112 (R = P = 1) or 133 − 19 = 114 (R = Q = 3). The question says all five digits are distinct, so these cases do not count.
  • d: incorrect — You only get more than 4 if you drop a condition. Ignoring T < 6 adds 134 − 18 = 116 and 135 − 19 = 116. Ignoring distinctness adds pairs with R = 1 or R = 3. With every condition applied, there are exactly 3 pairs.

How to eliminate

Do the subtraction column by column instead of expanding the algebra. In the hundreds column P stays P, so the tens column has no borrow. Then 3 − P − (borrow from the units) = P forces a borrow from the units and P = 1. The units column becomes R + 10 − S = T, or S = R + 10 − T. Since S ≤ 9, R must be smaller than T. T can only be 2, 4 or 5, because 1 and 3 are used. List R below T without using 1 or 3: T = 2 gives nothing, T = 4 gives R = 2, and T = 5 gives R = 2 or 4. That is 3 pairs. Check that S does not repeat a digit already used: S = 8, 7, 9, so all are fine. About 60–90 seconds once you see the hundreds-column trick. Attempt it in the first round. The case list is short and the answer can be checked.

Know more

Cryptarithm subtraction: work the columns from left to right for structure, and from right to left for borrows.

In A − B = C, a column changes only through borrows. Two quick checks do most of the work:

Column observation What it forces
Top digit = bottom result digit in a column with nothing subtracted No borrow came out of the column to its right
x − y = z with z > x That column borrowed: x + 10 − y = z
Equation like 2P = 3 No whole-number solution, so switch the borrow assumption

After the borrows are fixed, each column becomes a linear equation. Use the digit bounds (1–9, distinct) to cut the cases. Count only combinations that satisfy every condition. Write down the used digits first so that repeats are easy to spot.

Worked variant. AB4 − AC = AAD, with distinct non-zero digits and B = 5. Hundreds: A is unchanged, so the tens column has no borrow. Tens: 5 − A − (borrow) = A. Without a borrow, 2A = 5, which is impossible. With a borrow, 2A = 4, so A = 2. Units: 4 + 10 − C = D, so C + D = 14 with C and D chosen from {1, 3, 6, 7, 8, 9}. The pairs are (C, D) = (6, 8), (8, 6) and (7, 7). (7, 7) is not allowed because the digits must be distinct, which leaves 2 solutions, for example 254 − 26 = 228.