9 lines
241 B
Python
9 lines
241 B
Python
import random
|
|
import sys
|
|
if len(sys.argv) == 2: x = int(sys.argv[1])
|
|
else: x = 1000
|
|
file = open("randompath1000", "w")
|
|
for i in range(x):
|
|
file.write("edge({}, {}).\n".format(i, i + 1))
|
|
file.write("edge({}, 1).\n".format(x))
|
|
file.close() |