Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Paint black solution in Creative category for Auto Painting by Cjkjvfnby
"""
I see a red door and I want it painted black
No colors anymore I want them to turn black
"""
def paint_black(painted, doors, capacity, load):
next_load = capacity - len(load)
while True:
try:
for x in range(next_load):
load.append(doors.pop(0))
except IndexError:
return load
else:
painted.append(''.join(load))
load.clear()
next_load = capacity
def checkio(capacity, number):
red_doors_one_side = [str(x) for x in range(number)]
red_door_other_side = red_doors_one_side[:]
painted_black = []
load = paint_black(painted_black, red_doors_one_side, capacity, [])
if '0' in load:
painted_black.append(''.join(load))
load.clear()
load = paint_black(painted_black, red_door_other_side, capacity, load)
if load:
painted_black.append(''.join(load))
return ','.join(painted_black)
"""
I look inside myself and see my heart is black
I see my red door and it has been painted black
"""
April 26, 2014
Comments: