Python Challenge (level 22)
URI: http://www.pythonchallenge.com/pc/hex/copper.htmlUsername: butter; password: fly
说明:
—
解题方法:
import Image, ImageSequence
img = Image.open("white.gif") # http://www.pythonchallenge.com/pc/hex/white.gif
out = Image.new("P", (125, 125))
pix = out.load()
pos =
for x in :
if x == 19698:
pos -= 1
pos -= 1
elif x == 19700:
pos -= 1
elif x == 19702:
pos += 1
pos -= 1
elif x == 20098:
pos -= 1
elif x == 20100:
pos = + 10, pos + 10]
elif x == 20102:
pos += 1
elif x == 20498:
pos -= 1
pos += 1
elif x == 20500:
pos += 1
elif x == 20502:
pos += 1
pos += 1
pix, pos] = 200
out.save("solution.png")
过关答案:
bonus
页:
[1]