Creative Chitti has buttons +1, +10, +100, +1000, +10000, +100000 and +1000000, and likes to find many ways to make a number. For 5072:
- (50 × 100) + (7 × 10) + (2 × 1) = 5072 → 59 clicks
- (3 × 1000) + (20 × 100) + (72 × 1) = 5072 → 95 clicks
- (5 × 1000) + (6 × 10) + (12 × 1) = 5072 → 23 clicks
Systematic Sippy wants as few clicks as possible. Use each button at most 9 times, starting from the biggest:
5072 = (5 × 1000) + (0 × 100) + (7 × 10) + (2 × 1) → 5 + 0 + 7 + 2 = 14 clicks
| Number | Fewest clicks |
|---|---|
| 8300 | 8 + 3 = 11 |
| 40629 | 4 + 0 + 6 + 2 + 9 = 21 |
| 56354 | 5 + 6 + 3 + 5 + 4 = 23 |
| 66666 | 30 |
| 367813 | 28 |
The pattern: the fewest clicks equals the sum of the digits, because the minimal expression is exactly the place value form of the number. Ten clicks of one button can always be replaced by one click of the next button, which saves 9 clicks.
Chitti's 30-click puzzle. Swapping one press for ten presses of the next smaller button adds 9 clicks, so the possible click counts for a number are its digit sum, digit sum + 9, + 18, … For exactly 30 clicks the digit sum must be 3, 12, 21 or 30.
- Largest 3-digit number: 999 has digit sum 27 (no good); the largest with digit sum 21 is 993 (9 + 9 + 3 = 21, then one swap adds 9).
- Smallest 3-digit number: 102 (digit sum 3), for example 8 tens + 22 ones = 102 in 30 clicks.
Tap the diagram to enlarge it
- Many ways make one number
- Fewest clicks = digit sum
- Swapping adds 9 clicks