scripts/ege/Вариант/12.py
2023-05-05 00:45:01 +03:00

11 lines
191 B
Python
Vendored

s = "7" * 512
c = 0
while "7777" in s or "1111" in s:
c += 1
if "7777" in s:
s = s.replace("7777", "1", 1)
else:
s = s.replace("1111", "7", 1)
print(c)