Advertisement
LilChicha174

Untitled

Mar 28th, 2022
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. # ПОКА нашлось (333) ИЛИ нашлось (999)
  2. # ЕСЛИ нашлось (333)
  3. # ТО заменить (333, 9)
  4. # ИНАЧЕ заменить (999, 3)
  5. a = "9" * 127
  6.  
  7. while "333" in a or "999" in a:
  8.     if "333" in a:
  9.         a = a.replace("333", "9", 1)
  10.     else:
  11.         a = a.replace("999", "3", 1)
  12. print(a)
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement