All pastes #138628 Raw Edit

Something

public python v1 · immutable
#138628 ·published 2006-08-19 10:29 UTC
rendered paste body
import random, operator, osdef getNum(pos, sprit):  return str(random.randint(0, pos)) + ' ' + str(random.randint(1, sprit))def getTest(length):  return "%d\n%s" % (length,      '\n'.join([getNum(10, 2) for x in xrange(length)] + ["10 1"]))  def getResult(prog, input):  fin, fout = os.popen2(prog, "w")  fin.write(input)  fin.close()  output = fout.read()  fout.close()  return outputfor i in xrange(100):  input = "1\n"+getTest(9)  yann, nico = getResult("./yann", input), getResult("./nico", input)  if(yann != nico):    print "Yann: %sNico: %sInput: %s\n" % (yann, nico, input)  print yann,