Ejemplo n.º 1
0
def args(resource_accessor):
    return [
        problem018.read_triangle(
            resource_accessor.resource_filename("triangle.txt"))
    ]
Ejemplo n.º 2
0
 def test_read_triangle(self):
     """Test read_triangle()"""
     triangle = p18.read_triangle(TEST_DATA)
     self.assertEquals(3, triangle[0][0])
     self.assertEquals(8, triangle[3][0])
     self.assertEquals(4, triangle[2][1])
Ejemplo n.º 3
0
 def test_max_path_sum(self):
     """Test max_path_sum()"""
     triangle = p18.read_triangle(TEST_DATA)
     self.assertEquals(23, p18.max_path_sum(triangle))
Ejemplo n.º 4
0
def args(resource_accessor):
    return [problem018.read_triangle(
        resource_accessor.resource_filename("triangle.txt"))]