Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Auto Painting solution in Uncategorized category for Auto Painting by capback250
# migrated from python 2.7
def checkio(capacity, number):
items = [[str(n), 2] for n in range(number)]
actions = []
while items:
operation = ''
print(items[:capacity])
for item in items[:capacity]:
item[1] -= 1
operation += item[0]
actions.append(operation)
items = sorted([c for c in items if c[1] > 0], key=lambda c: c[1], reverse=True)
return ','.join(actions)
Nov. 28, 2015