示例#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(","))