Skip to content

Instantly share code, notes, and snippets.

@idlecool
Last active December 13, 2015 16:59
Show Gist options
  • Save idlecool/4944674 to your computer and use it in GitHub Desktop.
Save idlecool/4944674 to your computer and use it in GitHub Desktop.
f = open('addmul.in', 'r')
lines = f.readlines()
for index in xrange(len(lines)):
tf = open('input'+str(index)+'.txt', 'w')
tf.write(lines[index].strip())
tf.close()
f.close()
f = open('addmul.ans', 'r')
lines = f.readlines()
for index in xrange(len(lines)):
tf = open('output'+str(index)+'.txt', 'w')
tf.write(lines[0].split(":")[1].strip())
tf.close()
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment