def integratedLevel(numbers: str, sublength: int): from probs.prob02_algospot_pi.pi import subSameNumber, subSimpleIncrease, \ subSimpleDecrease, subRotate, subArithmeticSequence if subSameNumber(numbers, sublength): return 1 if subSimpleIncrease(numbers, sublength): return 2 if subSimpleDecrease(numbers, sublength): return 2 if subRotate(numbers, sublength): return 4 if subArithmeticSequence(numbers, sublength): return 5 return 10
def test_sub_8(self): self.assertEqual(subRotate('3432', 3), False)
def test_sub_failedcase_1(self): self.assertEqual(subRotate('12673939', 3), True)
def test_sub_6(self): self.assertEqual(subRotate('123232', 5), True)
def test_sub_7(self): self.assertEqual(subRotate('3234', 3), False)
def test_sub_5(self): self.assertEqual(subRotate('12323', 4), True)
def test_sub_4(self): self.assertEqual(subRotate('1232', 3), True)
def test_sub_3(self): self.assertEqual(subRotate('132323', 5), True)
def test_sub_2(self): self.assertEqual(subRotate('13232', 4), True)
def test_sub_1(self): self.assertEqual(subRotate('1323', 3), True)