def main(): title = "Advent of Code 2017!" print("{title}\n{line}\n\n".format(title=title, line="=" * len(title))) t1 = lib.measure(problem1) print("Problem 1 took {:.3f}s to solve.\n\n".format(t1)) t2 = lib.measure(problem2) print("Problem 2 took {:.3f}s to solve.".format(t2))
def main(): title = "Advent of Code 2020!" print("{title}\n{line}\n\n".format(title=title, line="=" * len(title))) input = read_input() t1 = lib.measure(lambda: problem1(input)) print("Problem 1 took {:.6f}s to solve.\n\n".format(t1)) t2 = lib.measure(lambda: problem2(input)) print("Problem 2 took {:.6f}s to solve.".format(t2))
def main(): title = "Advent of Code 2020!" print("{title}\n{line}\n\n".format(title=title, line="=" * len(title))) globals['lines'] = read_input() t1 = lib.measure(problem1) print("Problem 1 took {:.4f}s to solve.\n\n".format(t1)) t2 = lib.measure(problem2) print("Problem 2 took {:.4f}s to solve.".format(t2))
def main(): global result title="Advent of Code 2017!" print("{title}\n{line}\n\n".format(title=title, line="="*len(title))) result=tokenize_input(read_input()) t1=lib.measure(problem1) print("Problem 1 took {:.3f}s to solve.\n\n".format(t1)) t2=lib.measure(problem2) print("Problem 2 took {:.3f}s to solve.".format(t2))
def poll_measure(): global files_dirc ret = measure() if ret != -1.0: f = open(os.path.join(files_dir, 'echo.dat'), "w") f.write(str(ret)) f.close()