Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ПОКА нашлось (333) ИЛИ нашлось (999)
- # ЕСЛИ нашлось (333)
- # ТО заменить (333, 9)
- # ИНАЧЕ заменить (999, 3)
- a = "9" * 127
- while "333" in a or "999" in a:
- if "333" in a:
- a = a.replace("333", "9", 1)
- else:
- a = a.replace("999", "3", 1)
- print(a)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement