Problem #51 MEDIUM

The Cartographer's Code

Scenario Number Theory Deduction Logic

Problem Statement

What is the 3-digit combination on the chest?

Answer & Quick Explanation

Think you've got it? Click below to check your answer.

531 and 621 both satisfy all constraints: odd, distinct digits, strictly decreasing (5>3>1 and 6>2>1), non-zero units digit, and divisible by their digit sum (531/9=59 and 621/9=69). In context, 531 is the classic intended answer.

Detailed Editorial Solution

Want to see the step-by-step breakdown? Click below to reveal the editorial.

Apply constraints one by one, using each to prune the candidate list. Start with the strictest structural constraint (strictly decreasing digits, all different, odd, non-zero units) then apply divisibility. Step 1: Constraint set: number ABC where A > B > C, C is odd and non-zero, all digits different, and ABC is divisible by A+B+C. Step 2: Since C is odd and non-zero: C is in {1, 3, 5, 7, 9}. Since A > B > C and all are single digits (1-9), maximum C can be is 7 (need B > C and A > B, all under 9). Step 3: List some candidates with decreasing digits: 321, 421, 431, 521, 531, 532, 621... focus on odd ones with non-zero units: 321, 431, 521, 531, 541, 543, 621, 631, 641, 643, 651, 653, 721... Step 4: Test 135: digits 1,3,5 — but we need A>B>C, so this would be 531. Digit sum = 5+3+1 = 9. Is 531 divisible by 9? 531/9 = 59. Yes! Check: 531 is odd (ends in 1), all digits different, 5>3>1, units digit not zero. All constraints satisfied. Step 5: Verify no other solution exists: test nearby candidates like 321 (sum=6, 321/6=53.5 — no), 432 (even — out), 531 (works), 621 (sum=9, 621/9=69 — yes! But 621 is odd? ends in 1 — yes. 6>2>1 — yes. All different — yes). So 621 also works. Step 6: Both 531 and 621 satisfy all constraints. The puzzle as stated may have two solutions. In a locked-chest scenario, context or an additional clue would distinguish them — but both are valid mathematical answers. Key Insight: Constraint satisfaction problems are best solved by applying the most restrictive constraint first to minimise the search space. Here, the strictly decreasing digit requirement dramatically shrinks the candidate pool before you even apply divisibility testing.