# Euler Solution 79

### From ProgSoc Wiki

# Solutions for Problem 79

**NOTE:** Easter egg again, once again not mentioned or linked from the main page.

Analysing the keylog from login where a user is asked for 3 digits from a code (always ordered left to right), can you work out the code?

## Pen and Paper by SanguineV

Runtime: about a minute

Note that digits in braces in progressive solution may be reordered.

Steps:

- Start with first code: 319
- Second and third share two digits "80": (3{6)1}(89)0
- Fifth adds "2" between 1 and 9: (3{6)1}[2(8]9)0
- Seventh adds "7" before "6": [7(3]{6)1}[2(8]9)0
- Eight orders "8" and "9": [7(3]{6)1}(28)90
- Eleven orders "3" and "6": (73)(61)(28)90
- Sixteen orders "6" and "1": (73)16(28)90
- Seventeen orders "7" and "3": 7316(28)90
- Thirty four orders "2" and "8": 73162890

No doubt a computer can solve it in milliseconds, but coding it takes longer. It took me longer to write up the solution than to solve it!