def test1(self): self.assertEqual(solver('1122'), 3)
def test3(self): self.assertEqual(solver('1234'), 0)
def test4(self): self.assertEqual(solver('912121239'), 9)
def test2(self): self.assertEqual(solver('1111'), 4)