Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- file = open('3.txt')
- A = file.readline()
- A = A.replace('4', 'a')
- A = A.replace('3', 'e')
- A = A.replace('yandex', '*')
- s = '*'
- while s in A:
- s += '*'
- s = s[1:]
- if s in A:
- print(len(s) * 6)
- if s + 'y' in A:
- print(len(s) * 6 + 1)
Advertisement
Add Comment
Please, Sign In to add comment