aoc2021/aoclib/output.py
2021-11-21 13:04:32 +01:00

9 lines
370 B
Python

def printSolution(day, part, solution, test=None, test_case=0):
if test is not None:
print(
"(TEST case%d/day%d/part%d) -- got '%s' -- expected '%s' -> %s"
% (test_case, day, part, solution, test, "correct" if test == solution else "WRONG")
)
else:
print("Solution to day %s, part %s: %s" % (day, part, solution))