예제 #1
0
 def test_case_5(self):
     test = [
         9,
         [2, -3, 4],
         1,
         [1, 1, [1, 1, 1]],
         [[[[3, 4, 1]]], 8],
         [1, 2, 3, 4, 5, [6, 7], -7],
         [1, [2, 3, [4, 5]], [6, 0, [7, 0, -8]], -7],
         [
             1, -3, 2,
             [1, -3, 2, [1, -3, 2], [1, -3, 2, [1, -3, 2]], [1, -3, 2]]
         ],
         -3,
     ]
     self.assertEqual(productSum(test), 1351)
예제 #2
0
 def test_case_2(self):
     test = [1, 2, [3], 4, 5]
     self.assertEqual(productSum(test), 18)
예제 #3
0
 def test_case_1(self):
     test = [1, 2, 3, 4, 5]
     self.assertEqual(productSum(test), 15)
예제 #4
0
 def test_case_6(self):
     test = [5, 2, [7, -1], 3, [6, [-13, 8], 4]]
     self.assertEqual(productSum(test), 12)
예제 #5
0
 def test_case_4(self):
     test = [[[[[5]]]]]
     self.assertEqual(productSum(test), 600)
예제 #6
0
 def test_case_3(self):
     test = [[1, 2], 3, [4, 5]]
     self.assertEqual(productSum(test), 27)