day13/main.py
def puzzle2(input_file):
    """This requires the use of the Chinese Remainder Theorem. Online solvers
    exist for this type of problem:

    https://www.dcode.fr/chinese-remainder

    I will format the puzzle input to match that of the solver.
    """

    with open(input_file, "r") as fh:
        time_now = int(fh.readline())
        busses = []
        for n, value in enumerate(fh.readline().split(",")):
            if value == "x":
                continue
            busses.append(Bus(id=int(value), offset=n))

    # Formatting the input for a CRT solver
    print("Type this into a Chinese Remainder Theorem solver:")
    print("")
    p = lambda s1, s2: print("{:>12s} | {:>9s}".format(s1, s2))
    p("Remainders A", "Modulos B")
    p("------------", "---------")
    for bus in busses:
        p(str(-bus.offset), str(bus.id))
    print("")
This requires the use of the Chinese Remainder Theorem. Online solvers
    exist for this type of problem:

    https://www.dcode.fr/chinese-remainder

    I will format the puzzle input to match that of the solver.
    
This requires the use of the Chinese Remainder Theorem. Online solvers
exist for this type of problem.



I will format the puzzle input to match that of the solver.
This requires the use of the Chinese Remainder Theorem . Online solvers exist for this type of problem . I will format the puzzle input to match that of the solver .
def puzzle2(input_file):
    with open(input_file, "r") as fh:
        time_now = int(fh.readline())
        busses = []
        for n, value in enumerate(fh.readline().split(",")):
            if value == "x":
                continue
            busses.append(Bus(id=int(value), offset=n))
    print("Type this into a Chinese Remainder Theorem solver:")
    print("")
    p = lambda s1, s2: print("{:>12s} | {:>9s}".format(s1, s2))
    p("Remainders A", "Modulos B")
    p("------------", "---------")
    for bus in busses:
        p(str(-bus.offset), str(bus.id))
    print("")
def puzzle2 ( input_file ) : with open ( input_file , "r" ) as fh : time_now = int ( fh . readline ( ) ) busses = [ ] for n , value in enumerate ( fh . readline ( ) . split ( "," ) ) : if value == "x" : continue busses . append ( Bus ( id = int ( value ) , offset = n ) ) print ( "Type this into a Chinese Remainder Theorem solver:" ) print ( "" ) p = lambda s1 , s2 : print ( "{:>12s} | {:>9s}" . format ( s1 , s2 ) ) p ( "Remainders A" , "Modulos B" ) p ( "------------" , "---------" ) for bus in busses : p ( str ( - bus . offset ) , str ( bus . id ) ) print ( "" )
This requires the use of the Chinese Remainder Theorem.
This requires the use of the Chinese Remainder Theorem .
"""This requires the use of the Chinese Remainder Theorem. Online solvers
    exist for this type of problem:

    https://www.dcode.fr/chinese-remainder

    I will format the puzzle input to match that of the solver.
    """ # Formatting the input for a CRT solver
input_file