# puzzle gauntlet medium

The Digit Crusher

Crush a number by summing its digits. Still more than one digit? CRUSH AGAIN. Repeat until a single digit survives. 🔨

You get n. Print the final single digit.

Example:

Input: n = 9875 Output: 2

9+8+7+5 = 29, then 2+9 = 11, then 1+1 = 2 — a single digit at last.

💡 need a hint?

pg-digit-crusher.py🔒 given lines are locked — write your code in between
loading...