Untitled

 avatar
user_8840555
plain_text
2 years ago
421 B
4
Indexable
for q in range(0,30):
    for i in range(0,30):
        for o in range(0,30):
            s = '0' + '1' * q + '2' * i + '3' * o  + '0'
            while '00' not in s:
                s = s.replace('01','210',1)
                s = s.replace('02','320',1)
                s = s.replace('03','3012',1)
            if s.count('1') == 26 and s.count('2') == 54 and s.count('3') == 48:
                print(q+i+o+2)
Editor is loading...