From a7c7a9949e131e8858e2eb3c4a6d4885dfb7aaa9 Mon Sep 17 00:00:00 2001 From: zhangtianli2006 Date: Mon, 23 Aug 2021 19:35:50 +0800 Subject: [PATCH] [feature] delete tmp files Signed-off-by: zhangtianli2006 --- vcheck.py | 7 +++++-- vmake.py | 13 ++++++++++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/vcheck.py b/vcheck.py index 4b018f4..ccb2662 100644 --- a/vcheck.py +++ b/vcheck.py @@ -111,17 +111,20 @@ for i in range(1, sub_tasks + 1): re += 1 print( - " Case #{}.{}: {} ({}ms) [{}%]".format( + " [{}%] Case #{}.{}: {} ({}ms)".format( + round((tot_id / tot_tasks) * 100), i, j, res_str, round(elapsed_time * 1000, 2), - round((tot_id / tot_tasks) * 100), ) ) tot_end_time = time.time() +if os.path.exists(".output.tmp"): + os.remove(".output.tmp") + print("\nSummary:", end="") if wa != 0: print(" WA", end="") diff --git a/vmake.py b/vmake.py index 9dd8fb6..071eebe 100644 --- a/vmake.py +++ b/vmake.py @@ -88,16 +88,19 @@ for i in range(1, sub_tasks + 1): max_case = (i, j) print( - " Made case #{}.{}: ({}ms) [{}%]".format( + " [{}%] Made case #{}.{}: ({}ms)".format( + round((tot_id / tot_tasks) * 100), i, j, round(std_time * 1000, 2), - round((tot_id / tot_tasks) * 100), ) ) tot_end_time = time.time() +if os.path.exists(".input.tmp"): + os.remove(".input.tmp") + print("\nSummary:") print(" Total time: {}ms".format(round((tot_end_time - tot_start_time) * 1000, 2))) print( @@ -107,4 +110,8 @@ print( ) if err_cnt != 0: - print("****[ERR] {} times. [{}%]".format(err_cnt, (err_cnt * 100 // tot_tasks))) + print( + "****[ERR] {} errors occurred. [{}%]".format( + err_cnt, (err_cnt * 100 // tot_tasks) + ) + )