Remove extraneous println

This commit is contained in:
akp 2021-12-11 00:34:10 +00:00
parent a1d2136fad
commit 6e0c944e03
No known key found for this signature in database
GPG key ID: AA5726202C8879B7
2 changed files with 0 additions and 49 deletions

View file

@ -1,47 +0,0 @@
from py import Challenge
import time
import json
TASKS_STR = input()
TASKS = json.loads(TASKS_STR)
def send_result(task_id, ok, output, duration):
print(json.dumps({
"task_id": task_id,
"ok": ok,
"output": str(output) if output is not None else "",
"duration": float(duration),
}), flush=True)
for task in TASKS:
taskPart = task["part"]
task_id = task["task_id"]
run = None
if taskPart == 1:
run = lambda: Challenge.one(task["input"])
elif taskPart == 2:
run = lambda: Challenge.two(task["input"])
elif taskPart == 3:
run = lambda: Challenge.vis(task["input"], task["output_dir"])
else:
send_result(task_id, False, "unknown task part", 0)
continue
start_time = time.time()
res = None
err = None
try:
res = run()
except Exception as e:
err = f"{type(e)}: {e}"
end_time = time.time()
running_time = end_time-start_time
if err is not None:
send_result(task_id, False, err, running_time)
else:
send_result(task_id, True, res, running_time)

View file

@ -66,8 +66,6 @@ func run() error {
return err
}
fmt.Println()
runner := runners.Available[selectedImplementation](selectedChallenge.Dir)
if err := runner.Start(); err != nil {
return err