Cipher dict
Undefined
English
The mission is in Blocked Mode. Access to the solutions is blocked for a day or two (even after you share your own), until we'll have enough solutions for you to check. All users who've solved the mission will get the notifications about their opening.

In this mission, you have to convert a plain text to a cipher dictionary according to the next rules.

1. Encode the plain text with utf-8.
2. Take this value as a single hexadecimal number and convert it to a decimal number.
3. Make a empty dictionary A.
4. Add a data(key = value of each digit of decimal number, value = empty dictionary) to the appropriate dictionary.
1. Initial dictionary is A
2. Change to a dictionary that was created earlier at the timing when the ascending order and descending order of the value of each digit of the decimal number are switched. (Change even if the same value continues.) Store from the upper digit. And find the ascending part first.
3. ex.)   decimal number == 1248854369653 → 1248 / 8543 / 69 / 653
• Change at the timing /.

Input: A plain text as a string.

Output: A cipher data as a dict.

Example:

```get_cipher("hello") == {4: {4: {8: {3: {7: {0: {4: {}, 7: {}}, 2: {2: {}}}, 8: {3: {}}}}}}}
get_cipher("This is a plain text.") == {1: {3: {2: {1: {4: {7: {4: {1: {0: {}, 2: {}, 7: {}}, 4: {9: {}}, 8: {3: {}}},
6: {8: {1: {}, 4: {}, 9: {}}}}}, 9: {5: {5: {6: {1: {}, 4: {}}, 8: {}}}}}}}},
2: {6: {2: {8: {4: {9: {5: {2: {}, 8: {}}}}}}}}, 3: {2: {4: {1: {4: {8: {3: {0: {},
2: {}}}}}, 3: {5: {3: {5: {4: {}, 7: {}}}}}}}}}
```

How it’s used: (It may not be valuable as a cipher, but it will be useful for studying character code conversion and dictionary structure.)

Precondition: The text contain only ASCII symbols.

## Become Awesome

• No Limits
• More Content
24
Settings
Code:
Other:
CheckiO Extensions

CheckiO Extensions allow you to use local files to solve missions. More info in a blog post.

In order to install CheckiO client you'll need installed Python (version at least 3.8)

Install CheckiO Client first:

`pip3 install checkio_client`

`checkio --domain=py config --key=`

Sync solutions into your local folder

`checkio sync`

(in beta testing) Launch local server so your browser can use it and sync solution between local file end extension on the fly. (doesn't work for safari)

`checkio serv -d`

Alternatevly, you can install Chrome extension or FF addon

`checkio install-plugin`
`checkio install-plugin --ff`
`checkio install-plugin --chromium`

Read more here about other functionality that the checkio client provides. Feel free to submit an issue in case of any difficulties.