add skeletton
This commit is contained in:
36
7/nospaceleft.py
Normal file
36
7/nospaceleft.py
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
from aocd.models import Puzzle
|
||||||
|
from aocd import submit
|
||||||
|
|
||||||
|
|
||||||
|
def get_size(commands: list, dirs: list, size: int) -> int:
|
||||||
|
"""
|
||||||
|
parse tree structure and get size of all files > size
|
||||||
|
"""
|
||||||
|
print(commands)
|
||||||
|
print(dirs)
|
||||||
|
print(size)
|
||||||
|
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
def parse_input(data: str) -> (list,list):
|
||||||
|
"""
|
||||||
|
parse input data
|
||||||
|
"""
|
||||||
|
return ([],[])
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
# get puzzle and parse data
|
||||||
|
puzzle = Puzzle(year=2022, day=7)
|
||||||
|
commands, dirs = parse_input(puzzle.input_data)
|
||||||
|
|
||||||
|
# part a:
|
||||||
|
answer_a = get_size(commands, dirs, 1000)
|
||||||
|
print(f"{answer_a}")
|
||||||
|
#submit(answer_a, part="a", day=7, year=2022)
|
||||||
|
|
||||||
|
# part b:
|
||||||
|
answer_b = get_size(commands, dirs, 10000)
|
||||||
|
print(f"{answer_b}")
|
||||||
|
#submit(answer_b, part="b", day=7, year=2022)
|
||||||
Reference in New Issue
Block a user