Skip to content

Instantly share code, notes, and snippets.

@lufeihaidao
Created April 13, 2014 15:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lufeihaidao/10589703 to your computer and use it in GitHub Desktop.
Save lufeihaidao/10589703 to your computer and use it in GitHub Desktop.
Q12 of python challenge
# 一定要注意,读写文件要强调是二进制
evil = File.open("evil2.gfx", 'rb').read
outputs = (0..4).map { |i| File.open("out#{i}", "wb") }
evil.each_char.with_index { |c, i| outputs[i%5].write(c) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment