Advertisement
nq1s788

12

Dec 27th, 2023
962
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.16 KB | None | 0 0
  1. s = "8"*1000
  2. while '999' in s or '888' in s:
  3.     if '888' in s:
  4.         s = s.replace('888' , '9' , 1)
  5.     else:
  6.         s = s.replace('999','8',1)
  7. print(s)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement