[feature] delete tmp files

Signed-off-by: zhangtianli2006 <zhangtianli2006@163.com>
This commit is contained in:
zhangtianli2006 2021-08-23 19:35:50 +08:00
parent 1acbe1787c
commit a7c7a9949e
2 changed files with 15 additions and 5 deletions

View File

@ -111,17 +111,20 @@ for i in range(1, sub_tasks + 1):
re += 1 re += 1
print( print(
" Case #{}.{}: {} ({}ms) [{}%]".format( " [{}%] Case #{}.{}: {} ({}ms)".format(
round((tot_id / tot_tasks) * 100),
i, i,
j, j,
res_str, res_str,
round(elapsed_time * 1000, 2), round(elapsed_time * 1000, 2),
round((tot_id / tot_tasks) * 100),
) )
) )
tot_end_time = time.time() tot_end_time = time.time()
if os.path.exists(".output.tmp"):
os.remove(".output.tmp")
print("\nSummary:", end="") print("\nSummary:", end="")
if wa != 0: if wa != 0:
print(" WA", end="") print(" WA", end="")

View File

@ -88,16 +88,19 @@ for i in range(1, sub_tasks + 1):
max_case = (i, j) max_case = (i, j)
print( print(
" Made case #{}.{}: ({}ms) [{}%]".format( " [{}%] Made case #{}.{}: ({}ms)".format(
round((tot_id / tot_tasks) * 100),
i, i,
j, j,
round(std_time * 1000, 2), round(std_time * 1000, 2),
round((tot_id / tot_tasks) * 100),
) )
) )
tot_end_time = time.time() tot_end_time = time.time()
if os.path.exists(".input.tmp"):
os.remove(".input.tmp")
print("\nSummary:") print("\nSummary:")
print(" Total time: {}ms".format(round((tot_end_time - tot_start_time) * 1000, 2))) print(" Total time: {}ms".format(round((tot_end_time - tot_start_time) * 1000, 2)))
print( print(
@ -107,4 +110,8 @@ print(
) )
if err_cnt != 0: 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)
)
)