コード例 #1
0
ファイル: tests.py プロジェクト: flaviamissi/euler
 def test_should_get_the_product_of_2_numbers_in_a_1x3_matrix(self):
     matrix = Matrix([[2, 3, 5]])
     assert_equals(matrix.greatest_line_product(2), 15)
コード例 #2
0
ファイル: tests.py プロジェクト: flaviamissi/euler
 def test_should_get_the_greatest_product_of_3_numbers_in_a_3x3_matrix(self):
     matrix = Matrix([[2, 1, 5], [1, 9, 4], [5, 2, 3]])
     self.assertEqual(matrix.greatest_line_product(3), 36)
コード例 #3
0
ファイル: tests.py プロジェクト: flaviamissi/euler
 def test_should_get_the_product_of_3_numbers_in_a_2x3_matrix(self):
     matrix = Matrix([[2, 1, 5], [4, 3, 5]])
     assert_equals(matrix.greatest_line_product(3), 60)
コード例 #4
0
ファイル: tests.py プロジェクト: flaviamissi/euler
 def test_should_get_the_product_of_4_numbers_in_a_2x5_matrix(self):
     matrix = Matrix([[2, 1, 5, 3, 2], [1, 9, 4, 3, 5]])
     assert_equals(matrix.greatest_line_product(4), 540)
コード例 #5
0
ファイル: tests.py プロジェクト: flaviamissi/euler
 def test_should_get_the_product_of_2_numbers_in_a_1x5_matrix(self):
     matrix = Matrix([[4, 2, 8, 5, 1]])
     assert_equals(matrix.greatest_line_product(2), 40)