def test1(self): a = '1' s = Solution() res = s.foo(a) self.assertEqual(1, res)
def test6(self): a = '654321' s = Solution() res = s.foo(a) self.assertEqual(2, res)
def test4(self): a = '1111' s = Solution() res = s.foo(a) self.assertEqual(5, res)
def test5(self): a = '0111' s = Solution() res = s.foo(a) self.assertEqual(0, res)
def test3(self): a = '2626' s = Solution() res = s.foo(a) self.assertEqual(4, res)