Untitled
user_8840555
plain_text
2 years ago
243 B
7
Indexable
s = '7' * 97 + '8'
while '777' in s or '78' in s:
if 8 == int(s[-1]):
if '78' in s:
s = s.replace('78','7',1)
elif '777' in s:
s = s.replace('777','78',1)
else:
break
print(s.count("7"))Editor is loading...