diff --git a/day3/input.txt b/day3/input.txt index dc00489..1bf59b8 100644 --- a/day3/input.txt +++ b/day3/input.txt @@ -297,4 +297,4 @@ TgbpGblWlMsjgWlgMfpNRgbRHHBnHHHtLpCJPCPBnBLJtQQL sbTlblTlvRbbGblbFcdDzccVcDVvzzzd zMzfzlGwSBMMSCMzhsPgfcPcfcbhjQPt FHHqJVdJmFmdVrJdJppthscjGtqRPRcccgcQbR -rvNJJpLrvvLnJvNFFvZZZBWznBWGSDCMnCwz \ No newline at end of file +rvNJJpLrvvLnJvNFFvZZZBWznBWGSDCMnCwz \ No newline at end of file diff --git a/day3/main.py b/day3/main.py index d322b15..4444810 100644 --- a/day3/main.py +++ b/day3/main.py @@ -37,15 +37,21 @@ priorityValue = { } for line in input: + print("Line: " + line) lineLength = len(line) - 1 + print("Length of line: " + str(lineLength)) lineLength = int(lineLength / 2) + print("Line Length: " + str(lineLength)) pack1 = line[:lineLength] + print("Pack 1: " + pack1) pack2 = line[lineLength:] + print("Pack 2: " + pack2) dupItem = "" for item in pack1: if (pack2.__contains__(item)): dupItem = item - print(dupItem) + # print(dupItem) + break total += determinePriority(dupItem) print(total) \ No newline at end of file