We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e423fe8 commit 6c9f819Copy full SHA for 6c9f819
tsptest.py
@@ -1,4 +1,4 @@
1
-import json
+import json, sys
2
3
with open("distances.json", "r") as f:
4
distances = json.load(f)
@@ -21,7 +21,7 @@ def test(func):
21
visited = set(route)
22
for pub in names:
23
if pub not in visited:
24
- print("ERR: Did not visit {}".visit(pub))
+ print("ERR: Did not visit {}".format(pub))
25
return
26
27
# Check time
@@ -34,3 +34,12 @@ def test(func):
34
speed / 1.05 # gets 5% slower at each pub
35
last = pub
36
print(t)
37
+
38
+def read_from_stdin(distances, names, drunk_factor):
39
+ lines = []
40
+ for line in sys.stdin:
41
+ lines.append(line.strip())
42
+ return lines
43
44
+if __name__ == "__main__":
45
+ test(read_from_stdin)
0 commit comments