def test_solution_of_problem(self): self.assertEqual(p.solution(10), 2520) self.assertEqual(p.solution(20), 232792560) self.assertEqual( p.solution(200), 337293588832926264639465766794841407432394382785157234228847021917234018060677390066992000L )
def test_1(self): places = [["POOOP", "OXXOX", "OPXPX", "OOXOX", "POXXP"], ["POOPX", "OXPXP", "PXXXO", "OXXXO", "OOOPP"], ["PXOPX", "OXOXP", "OXPOX", "OXXOP", "PXPOX"], ["OOOXX", "XOOOX", "OOOXX", "OXOOX", "OOOOO"], ["PXPXP", "XPXPX", "PXPXP", "XPXPX", "PXPXP"]] result = [1, 0, 1, 1, 1] self.assertEqual(problem.solution(places), result)
def test_solution(self): self.assertEqual(p.solution(), 4179871)
def test_solution(self): self.assertEqual(p.solution(10000), 31626)
def test_1(self): compressed = "one4seveneight" result = 1478 self.assertEqual(problem.solution(compressed), result)
def test_4(self): compressed = "123" result = 123 self.assertEqual(problem.solution(compressed), result)
def test_3(self): compressed = "2three45sixseven" result = 234567 self.assertEqual(problem.solution(compressed), result)
def test_2(self): compressed = "23four5six7" result = 234567 self.assertEqual(problem.solution(compressed), result)
def main(): count = util.read_number() end_str = "\n" if MULTILINE_OUTPUT else " " for i in range(1, count + 1): print("Case #%d:" % i, end = end_str) solution()
def test_input_1(self): board = [[1, 0, 0, 3], [2, 0, 0, 0], [0, 0, 0, 2], [3, 0, 1, 0]] r = 1 c = 0 result = 14 self.assertEqual(result, solution(board, r, c))
def test_input_2(self): board = [[3, 0, 0, 2], [0, 0, 1, 0], [0, 1, 0, 0], [2, 0, 0, 3]] r = 0 c = 1 result = 16 self.assertEqual(result, solution(board, r, c))