





def     a_       (					lowerCAmelCase_ :     str      ):
   __lowerCAmelCase				      =      [0 for i in range(len(lowerCAmelCase_      )      )]

   # initialize interval's left pointer and right pointer
   __lowerCAmelCase      ,      __lowerCAmelCase				      =      0, 0

   for i in range(1,      len(lowerCAmelCase_      )      ):
      # case when current index is inside the interval
      if i <= right_pointer:
         __lowerCAmelCase				      =      min(right_pointer - i + 1,      z_result[i - left_pointer]      )
         __lowerCAmelCase				      =      min_edge

      while go_next(lowerCAmelCase_,      lowerCAmelCase_,      lowerCAmelCase_      ):
         z_result[i] += 1

      # if new index's result gives us more right interval,
      # we've to update left_pointer and right_pointer
      if i + z_result[i] - 1 > right_pointer:
         __lowerCAmelCase      ,      __lowerCAmelCase				      =      i, i + z_result[i] - 1

   return z_result

def     a_       (					lowerCAmelCase_ :     int,      lowerCAmelCase_ :     list[int],      lowerCAmelCase_ :     str      ):
   return i + z_result[i] < len(lowerCAmelCase_      ) and s[z_result[i]] == s[i + z_result[i]]

def     a_       (					lowerCAmelCase_ :     str,      lowerCAmelCase_ :     str      ):
   __lowerCAmelCase				      =      0
   # concatenate 'pattern' and 'input_str' and call z_function
   # with concatenated string
   __lowerCAmelCase				      =      z_function(pattern + input_str      )

   for val in z_result:
      # if value is greater then length of the pattern string
      # that means this index is starting position of substring
      # which is equal to pattern string
      if val >= len(lowerCAmelCase_      ):
         answer += 1

   return answer


if __name__ == "__main__":
     import doctest

     doctest.testmod()




'''simple docstring'''

def 							_UpperCamelCase				(   lowerCAmelCase__:					int		,lowerCAmelCase__:					int   )      -> str:
							if a < 0 or b < 0:
														raise ValueError('the value of both inputs must be positive'   )
							SCREAMING_SNAKE_CASE_				=				str(bin(lowerCAmelCase__   )   )[2:]  # remove the leading "0b"
							SCREAMING_SNAKE_CASE_				=				str(bin(lowerCAmelCase__   )   )[2:]
							SCREAMING_SNAKE_CASE_				=				max(len(lowerCAmelCase__   )		,len(lowerCAmelCase__   )   )
							return "0b" + "".join(
							    str(int('1' in (char_a, char_b)   )   )
							    for char_a, char_b in zip(a_binary.zfill(lowerCAmelCase__   )		,b_binary.zfill(lowerCAmelCase__   )   )   )


if __name__ == "__main__":
							import doctest

							doctest.testmod()





