Advertisement
nq1s788

12

Sep 7th, 2024
704
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. #https://inf-ege.sdamgia.ru/problem?id=9365
  2. s = 68 * '8'
  3. while ('222' in s) or ('888' in s):
  4.     if '222' in s:
  5.         s = s.replace('222', '8', 1)
  6.     else:
  7.         s = s.replace('888', '2', 1)
  8. print(s)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement