예제 #1
0
    def test_18(self):
        sample_data = day18.get_data(day18.SAMPLE_PATH)
        self.assertEqual(day18.part_1(sample_data), 4140)
        self.assertEqual(day18.part_2(sample_data), 3993)

        challenge_data = day18.get_data(day18.INPUT_PATH)
        self.assertEqual(day18.part_1(challenge_data), 3987)
        self.assertEqual(day18.part_2(challenge_data), 4500)
예제 #2
0
 def test_18(self):
     challenge_data = day18.get_data(day18.INPUT_PATH)[0]
     self.assertEqual(day18.part_1(challenge_data), 25190263477788)
     self.assertEqual(day18.part_2(challenge_data), 297139939002972)
예제 #3
0
 def test_example_input(self):
     result = part_1(example_input)
     self.assertEqual(result, 6960)
예제 #4
0
 def test_real_input(self):
     result = part_1(input)
     self.assertEqual(result, 18213007238947)
예제 #5
0
 def test_with_example_6(self):
     self.assertEqual(part_1(EXAMPLE_6), 13632)
예제 #6
0
 def test_with_input(self):
     lines = read_input_lines(18)
     self.assertEqual(sum(part_1(line) for line in lines), 650217205854)
예제 #7
0
 def test_with_example_5(self):
     self.assertEqual(part_1(EXAMPLE_5), 12240)
예제 #8
0
 def test_with_example_4(self):
     self.assertEqual(part_1(EXAMPLE_4), 437)
예제 #9
0
 def test_with_example_3(self):
     self.assertEqual(part_1(EXAMPLE_3), 26)
예제 #10
0
 def test_with_example_2(self):
     self.assertEqual(part_1(EXAMPLE_2), 51)
예제 #11
0
 def test_with_example_1(self):
     self.assertEqual(part_1(EXAMPLE_1), 71)