Untitled
unknown
plain_text
a year ago
547 B
3
Indexable
Never
def Trbl(s): while '>1' in s or '>2' in s or '>3' in s: 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)).replace('>','')) if sum_s > 2023: array.append(k) print(min(array))