โ back to unit
Medium
# puzzle gauntlet medium
Unpack the Chant
Now run the machine backwards: 'a3b2' becomes 'aaabb'. Compression is only useful if you can UNcompress! ๐ค
You get a packed chant โ letter, count, letter, countโฆ (counts are single digits 1โ9). Print the original chant.
Example:
Input: packed = "a3b2"
Output: aaabb
Reading letter-digit pairs, "a" repeated 3 times gives "aaa" and "b" repeated 2 times gives "bb", joined into "aaabb".
๐ก need a hint?
pg-unpack-chant.py๐ given lines are locked โ write your code in between
loading...