Advertisement
Farz0l1x

Untitled

Apr 17th, 2024
471
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.16 KB | None | 0 0
  1. s = '1' * 100
  2. while '111' in s or '88888' in s:
  3.     if '111' in s:
  4.         s = s.replace('111', '88', 1)
  5.     else:
  6.         s = s.replace('88888', '8', 1)
  7. print(s)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement