def brute_force(self):
        best = 0
        for start in range(len(self.number)):
            n = self.number[start:start + 13]
            best = max(best, product(map(int, n)))

        return best
示例#2
0
 def sequence_solution(self) -> float:
     return product(self.get_n_champ(10 ** n) for n in range(7))
示例#3
0
 def test_non_iterable(self):
     with pytest.raises(TypeError):
         math.product(None)
示例#4
0
 def test_empty_sequence(self):
     assert math.product([]) == 1
示例#5
0
 def test_non_iterable(self):
     with T.assert_raises(TypeError):
         math.product(None)
示例#6
0
 def test_empty_sequence(self):
     T.assert_equal(math.product([]), 1)