Пример #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
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
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(","))