





def 	lowerCamelCase_		(							_UpperCamelCase					)						->		list[int]:






				"""simple docstring"""


				snake_case_		:       Optional[int]           =    [0 for i in range(len(_UpperCamelCase					)					)]

				# initialize interval's left pointer and right pointer
				snake_case_     ,				snake_case_		:       Tuple           =    0, 0

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

								while go_next(_UpperCamelCase					,							_UpperCamelCase					,							_UpperCamelCase					):
												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:
												snake_case_     ,				snake_case_		:       int           =    i, i + z_result[i] - 1

				return z_result






def 	lowerCamelCase_		(							_UpperCamelCase					,							_UpperCamelCase					,							_UpperCamelCase					)						->		bool:






				"""simple docstring"""


				return i + z_result[i] < len(_UpperCamelCase					) and s[z_result[i]] == s[i + z_result[i]]






def 	lowerCamelCase_		(							_UpperCamelCase					,							_UpperCamelCase					)						->		int:






				"""simple docstring"""


				snake_case_		:       Tuple           =    0
				# concatenate 'pattern' and 'input_str' and call z_function
				# with concatenated string
				snake_case_		:       Union[str, Any]           =    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(_UpperCamelCase					):
												answer += 1

				return answer


if __name__ == "__main__":
	import doctest

	doctest.testmod()


from functools import lru_cache

@lru_cache
def  __lowerCamelCase					( _lowercase			)       ->      int:
     if num < 0:
          raise ValueError('Number should not be negative.'			)

     return 1 if num in (0, 1) else num * factorial(num - 1			)


if __name__ == "__main__":
 import doctest

 doctest.testmod()


