Skip to content

Commit

Permalink
small formatting + example day changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AlecRosenbaum committed Dec 1, 2018
1 parent cf7e2c8 commit 6199bed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
1 change: 1 addition & 0 deletions 1/solution.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def solution_part_two(arg):

return curr_freq


if __name__ == "__main__":
with open("input.txt", "r") as fin:
problem_input = fin.read()
Expand Down
10 changes: 3 additions & 7 deletions example/solution.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
"""
Day 17 challenge
Day N challenge
"""
import re

import attr


def solution_part_one(arg):
Expand All @@ -15,7 +12,6 @@ def solution_part_one(arg):
buff.insert((idx % len(buff)) + 1, i)
idx += 1


return buff[(idx + 1) % len(buff)]


Expand All @@ -25,7 +21,6 @@ def solution_part_two(arg):
pos_zero = 0
after_zero = None


for i in range(1, 50000001):
# cycle the index
idx = (idx + arg) % buff_len
Expand All @@ -48,6 +43,7 @@ def solution_part_two(arg):


if __name__ == "__main__":
problem_input = 367
with open("input.txt", "r") as fin:
problem_input = fin.read()
print(solution_part_one(problem_input))
print(solution_part_two(problem_input))

0 comments on commit 6199bed

Please sign in to comment.