WIP
This commit is contained in:
parent
9cc30f5f84
commit
7aa931a3fc
@ -2,4 +2,38 @@ def update_table():
|
||||
"""
|
||||
Update README.md with the timings of the solved problems
|
||||
"""
|
||||
text = read()
|
||||
print(text)
|
||||
|
||||
def read():
|
||||
"""
|
||||
Read README.md
|
||||
"""
|
||||
with open("../README.md", "r") as f:
|
||||
text = [line.strip() for line in f.readlines() if line.strip() != ""]
|
||||
return text[-1:]
|
||||
|
||||
def write():
|
||||
"""
|
||||
Write to README.md
|
||||
"""
|
||||
pass
|
||||
|
||||
def execute(num):
|
||||
"""
|
||||
Execute script and return output
|
||||
"""
|
||||
import sys
|
||||
sys.path.insert(0, "./Python/")
|
||||
|
||||
import Problem001
|
||||
|
||||
res = eval(f"Problem{num:0>3}.compute()")
|
||||
print(res)
|
||||
time = str(res).split(sep=" ")
|
||||
print(time)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
# update_table()
|
||||
execute(1)
|
Loading…
x
Reference in New Issue
Block a user