## On the Subject of Digit Dilemma

"We ran up them digits, we ran up the money" - Young Thug

This is a module in which you select the correct keypad based on a mathemathical calculation deriving from edgework and a number provided on a display. The module has 3 stages; if you strike once, the entire module is reset.

### Initialization

By default, the module is off. To turn on the module, press any keypad number. The lights will flash yellow, and the number on the display will type out.

### Calculation

Ask the defuser for the number on the display. This will serve as the ‘target number’. Ask for the number of solved modules on the bomb and the number of strikes,
both **at the time of stage generation**. Lastly, determine the number of batteries on the bomb.

Add all the digits in the target number to each other (1234 becomes 10).

#### IF the sum of the digits is even:

- Divide the sum of the digits by the count of solved modules plus one plus the number of strikes.
- If the result is greater than 4, subtract 4 from it repeatedly until it is within the range of 1-4.
- Otherwise, if the result is less than 1, add 4 to it.

#### IF the sum of the digits is odd:

- Multiply the sum of the digits by the number of batteries.
- If the result is greater than 4, subtract 4 from it repeatedly until it is within the range of 1-4.
- Otherwise, if the result is less than 1, check if there is a vowel in the serial number.
- If the serial number contains a vowel, add 4 to it.
- Otherwise, press button 1.

Finally, press the button corresponding to your resulting number, considering only its integer part.

### Stage Completion

When a stage is completed, its stage indicator on the right will turn green. Repeat this process two more times until the module is solved.