Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '''
- Write a program that reads a string from the file that matches the text compressed
- using repetition coding and performs the inverse operation to get the source text.
- Write the received text to a file and attach it as an answer to this task.
- There are no numbers in the source text, so the code is uniquely interpretable.
- Note. This is the first task of the type Dataset Quiz. In such tasks,
- after clicking "Start Quiz" you have the link "download your dataset".
- Use this link to download the file with the input data to your computer.
- Run your program using this file as input.
- The output file that you can do with this should be sent as an answer to this task.
- Sample Input:
- a3b4c2e10b1
- Sample Output:
- aaabbbbcceeeeeeeeeeb
- '''
- a = input()
- b = []
- for i in range(len(a)):
- if a[i].lower() in 'qwertyuiopasdfghjklzxcvbnm':
- b+=a[i]
- a=a[:i]+"!"+a[i+1:]
- c=a.split('!')[1:]
- for i in range(len(b)):
- print(b[i]*int(c[i]), end="")
Add Comment
Please, Sign In to add comment