Renamed solver to main
parent
3fa9ecd01a
commit
a79651b1de
4
day01.py
4
day01.py
|
@ -18,7 +18,7 @@ def partI(modules):
|
|||
def partII(modules):
|
||||
return sum(map(calc_fuel, modules))
|
||||
|
||||
import solver
|
||||
tests = solver.Tests()
|
||||
from main import Tests
|
||||
tests = Tests()
|
||||
tests.add(1969, partI=654, partII=966)
|
||||
tests.add(100756, partI=33583, partII=50346)
|
||||
|
|
2
day02.py
2
day02.py
|
@ -44,5 +44,3 @@ def partII(init_prog):
|
|||
break
|
||||
|
||||
return 100*noun + verb
|
||||
|
||||
import solver
|
||||
|
|
4
day03.py
4
day03.py
|
@ -67,9 +67,9 @@ def partII(paths):
|
|||
|
||||
return min_steps(path1, path2)
|
||||
|
||||
import solver
|
||||
from main import Tests
|
||||
|
||||
tests = solver.Tests()
|
||||
tests = Tests()
|
||||
tests.add("R75,D30,R83,U83,L12,D49,R71,U7,L72\n" +
|
||||
"U62,R66,U55,R34,D71,R55,D58,R83",
|
||||
partI=159,
|
||||
|
|
5
day06.py
5
day06.py
|
@ -15,9 +15,8 @@ def partI(graph):
|
|||
def partII(graph):
|
||||
return graph.min_path("SAN", "YOU") - 2
|
||||
|
||||
import solver
|
||||
|
||||
tests = solver.Tests()
|
||||
from main import Tests
|
||||
tests = Tests()
|
||||
tests.add("""COM)B
|
||||
B)C
|
||||
C)D
|
||||
|
|
5
day07.py
5
day07.py
|
@ -46,9 +46,8 @@ def partII(amp):
|
|||
|
||||
return best
|
||||
|
||||
import solver
|
||||
|
||||
tests = solver.Tests()
|
||||
from main import Tests
|
||||
tests = Tests()
|
||||
|
||||
tests.add(
|
||||
"3,15,3,16,1002,16,10,16,1,16,15,15,4,15,99,0,0", partI=43210)
|
||||
|
|
4
day09.py
4
day09.py
|
@ -11,7 +11,7 @@ def partI(program):
|
|||
def partII(program):
|
||||
return Interpreter(program, SingletonIO).run(2)
|
||||
|
||||
import solver
|
||||
|
||||
tests = solver.Tests()
|
||||
from main import Tests
|
||||
tests = Tests()
|
||||
tests.add("104,1125899906842624,99", partI=1125899906842624)
|
||||
|
|
Loading…
Reference in New Issue