Untitled
unknown
plain_text
2 years ago
521 B
17
Indexable
def Trbl(s):
while '>1' or '>2' in s or '>3':
if '>1' in s:
s = s.replace('>1','2>',1)
if '>2' in s:
s = s.replace('>2','21>',1)
if '>3' in s:
s = s.replace('>3','11>',1)
return s
def sum_strock(s):
total = 0
for digit in s:
total += int(digit)
return total
array=[]
for k in range(1,1000):
sum_s= sum_strock(Trbl('>')+('1'*22)+('2'*k)+('3'*23))
if sum_s > 2023:
array.append(k)
print(min(array))Editor is loading...