





'''simple docstring'''




from __future__ import annotations




class      UpperCamelCase__					:




					"""simple docstring"""


					def __init__(						self				:			Optional[Any]      ,						lowerCamelCase_				:			int = 0						):

							'''simple docstring'''



							SCREAMING_SNAKE_CASE :				Optional[int]		=			key


					def lowerCamelCase_			(						self				:			List[Any]      ,						lowerCamelCase_				:			str      ,						lowerCamelCase_				:			int						):

							'''simple docstring'''



							assert isinstance(lowerCamelCase_      ,						lowerCamelCase_						) and isinstance(lowerCamelCase_      ,						lowerCamelCase_						)

							SCREAMING_SNAKE_CASE :				Optional[Any]		=			key or self.__key or 1

							# make sure key is an appropriate size
							key %= 2_55

							return [chr(ord(lowerCamelCase_						) ^ key						) for ch in content]


					def lowerCamelCase_			(						self				:			Union[str, Any]      ,						lowerCamelCase_				:			str      ,						lowerCamelCase_				:			int						):

							'''simple docstring'''



							assert isinstance(lowerCamelCase_      ,						lowerCamelCase_						) and isinstance(lowerCamelCase_      ,						lowerCamelCase_						)

							SCREAMING_SNAKE_CASE :				List[str]		=			key or self.__key or 1

							# make sure key is an appropriate size
							key %= 2_55

							return [chr(ord(lowerCamelCase_						) ^ key						) for ch in content]


					def lowerCamelCase_			(						self				:			Any      ,						lowerCamelCase_				:			str      ,						lowerCamelCase_				:			int = 0						):

							'''simple docstring'''



							assert isinstance(lowerCamelCase_      ,						lowerCamelCase_						) and isinstance(lowerCamelCase_      ,						lowerCamelCase_						)

							SCREAMING_SNAKE_CASE :				int		=			key or self.__key or 1

							# make sure key can be any size
							while key > 2_55:
									key -= 2_55

							# This will be returned
							SCREAMING_SNAKE_CASE :				Dict		=			""""""

							for ch in content:
									ans += chr(ord(lowerCamelCase_						) ^ key						)

							return ans


					def lowerCamelCase_			(						self				:			Dict      ,						lowerCamelCase_				:			str      ,						lowerCamelCase_				:			int = 0						):

							'''simple docstring'''



							assert isinstance(lowerCamelCase_      ,						lowerCamelCase_						) and isinstance(lowerCamelCase_      ,						lowerCamelCase_						)

							SCREAMING_SNAKE_CASE :				Optional[int]		=			key or self.__key or 1

							# make sure key can be any size
							while key > 2_55:
									key -= 2_55

							# This will be returned
							SCREAMING_SNAKE_CASE :				str		=			""""""

							for ch in content:
									ans += chr(ord(lowerCamelCase_						) ^ key						)

							return ans


					def lowerCamelCase_			(						self				:			str      ,						lowerCamelCase_				:			str      ,						lowerCamelCase_				:			int = 0						):

							'''simple docstring'''



							assert isinstance(lowerCamelCase_      ,						lowerCamelCase_						) and isinstance(lowerCamelCase_      ,						lowerCamelCase_						)

							try:
									with open(lowerCamelCase_						) as fin, open("""encrypt.out"""      ,						"""w+"""						) as fout:
											# actual encrypt-process
											for line in fin:
													fout.write(self.encrypt_string(lowerCamelCase_      ,						lowerCamelCase_						)						)

							except OSError:
									return False

							return True



					def lowerCamelCase_			(						self				:			List[str]      ,						lowerCamelCase_				:			str      ,						lowerCamelCase_				:			int						):

							'''simple docstring'''



							assert isinstance(lowerCamelCase_      ,						lowerCamelCase_						) and isinstance(lowerCamelCase_      ,						lowerCamelCase_						)

							try:
									with open(lowerCamelCase_						) as fin, open("""decrypt.out"""      ,						"""w+"""						) as fout:
											# actual encrypt-process
											for line in fin:
													fout.write(self.decrypt_string(lowerCamelCase_      ,						lowerCamelCase_						)						)

							except OSError:
									return False

							return True


# Tests
# crypt = XORCipher()
# key = 67

# # test encrypt
# print(crypt.encrypt("hallo welt",key))
# # test decrypt
# print(crypt.decrypt(crypt.encrypt("hallo welt",key), key))

# # test encrypt_string
# print(crypt.encrypt_string("hallo welt",key))

# # test decrypt_string
# print(crypt.decrypt_string(crypt.encrypt_string("hallo welt",key),key))

# if (crypt.encrypt_file("test.txt",key)):
#       print("encrypt successful")
# else:
#       print("encrypt unsuccessful")

# if (crypt.decrypt_file("encrypt.out",key)):
#       print("decrypt successful")
# else:
#       print("decrypt unsuccessful")










'''simple docstring'''




from math import factorial



def 		__A		(  lowerCamelCase_			,			lowerCamelCase_	):


		"""simple docstring"""



		if n < k or k < 0:
				raise ValueError("""Please enter positive integers for n and k where n >= k"""	)
		return factorial(lowerCamelCase_	) // (factorial(lowerCamelCase_	) * factorial(n - k	))


if __name__ == "__main__":
							print(
							    """The number of five-card hands possible from a standard""",
							    f'''fifty-two card deck is: {combinations(52, 5)}\n''',
							)

							print(
							    """If a class of 40 students must be arranged into groups of""",
							    f'''4 for group projects, there are {combinations(40, 4)} ways''',
							    """to arrange them.\n""",
							)

							print(
							    """If 10 teams are competing in a Formula One race, there""",
							    f'''are {combinations(10, 3)} ways that first, second and''',
							    """third place can be awarded.""",
							)



