예제 #1
0
def get_input_data() -> list[tuple]:
    instructions = []
    for i in read_input_lines(__file__, day=2):
        (direction, x) = i.strip().split(" ")
        instructions.append((direction, int(x)))

    return instructions
예제 #2
0
def get_input_data():
    return read_input_lines(__file__, 3)
예제 #3
0
def get_input_data() -> list[str]:
    return read_input_lines(__file__, 4)
예제 #4
0
def get_input_data():
    return [int(i.strip()) for i in read_input_lines(__file__, 1)]
예제 #5
0
def get_input_data() -> list[list[int]]:
    data = [i.strip().split("\t") for i in read_input_lines(__file__, 2)]
    table = [[int(j) for j in i] for i in data]

    return table
예제 #6
0
파일: day_1.py 프로젝트: code-shoily/aoc_py
def get_input_data() -> str:
    return read_input_lines(__file__, 1)[0]
예제 #7
0
def get_input_data():
    return array.array("I",
                       map(int,
                           read_input_lines(__file__, 2)[0].split(",")))
예제 #8
0
파일: day_2.py 프로젝트: code-shoily/aoc_py
def get_input_data() -> list[str]:
    return [i.strip() for i in read_input_lines(__file__, 2)]
예제 #9
0
def get_input_data() -> list[Paper]:
    return [
        Paper(*map(int, i.split("x"))) for i in read_input_lines(__file__, 2)
    ]
예제 #10
0
def get_input_data():
    return map(parse_command, read_input_lines(__file__, 1)[0].split(","))