zhukov000

12

Jun 24th, 2021
764
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.15 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)
  8.  
Advertisement
Add Comment
Please, Sign In to add comment