

"""simple docstring"""




# Lint as: python3

import hashlib
from typing import Union
def 					lowerCAmelCase  (   __UpperCamelCase ):
 '''simple docstring'''





 if isinstance(__UpperCamelCase							,      __UpperCamelCase ):
  # Data already in bytes, returns as it as
  return hash_data
 elif isinstance(__UpperCamelCase							,      __UpperCamelCase ):
  # We keep the data as it as for it ot be later encoded to UTF-8
  # However replace `\\` with `/` for Windows compatibility
  UpperCAmelCase__   :					int   				=   hash_data.replace("""\\"""							,      """/""" )
 elif isinstance(__UpperCamelCase							,      __UpperCamelCase ):
  UpperCAmelCase__   :					List[Any]   				=   str(__UpperCamelCase )
 else:
  # If data is not of the required type, raise error
  raise InvalidKeyError(__UpperCamelCase )

 return hash_data.encode("""utf-8""" )







class        __lowercase     (      __lowerCamelCase   ):

  def __init__(					self						:     Union[str, Any]   ,A						:     Optional[Any]      ):






   '''simple docstring'''
   UpperCAmelCase__   :					Union[str, Any]   				=   """\nFAILURE TO GENERATE DATASET: Invalid key type detected"""
   UpperCAmelCase__   :					Optional[int]   				=   f"\nFound Key {hash_data} of type {type(A      )}"
   UpperCAmelCase__   :					Dict   				=   """\nKeys should be either str, int or bytes type"""
   super().__init__(f"{self.prefix}{self.err_msg}{self.suffix}"      )







class        __lowercase     (      __lowerCamelCase   ):

  def __init__(					self						:     Dict   ,A						:     Any   ,A						:     Optional[int]   ,A						:     str=""      ):






   '''simple docstring'''
   UpperCAmelCase__   :					str   				=   key
   UpperCAmelCase__   :					Optional[int]   				=   duplicate_key_indices
   UpperCAmelCase__   :					Optional[int]   				=   fix_msg
   UpperCAmelCase__   :					Any   				=   """Found multiple examples generated with the same key"""
   if len(A      ) <= 20:
    UpperCAmelCase__   :					str   				=   f"\nThe examples at index {', '.join(A      )} have the key {key}"
   else:
    UpperCAmelCase__   :					str   				=   f"\nThe examples at index {', '.join(duplicate_key_indices[:20]      )}... ({len(A      ) - 20} more) have the key {key}"
   UpperCAmelCase__   :					str   				=   """\n""" + fix_msg if fix_msg else """"""
   super().__init__(f"{self.prefix}{self.err_msg}{self.suffix}"      )







class        __lowercase     :

  def __init__(					self						:     int   ,A						:     str      ):






   '''simple docstring'''
   UpperCAmelCase__   :					Union[str, Any]   				=   hashlib.mda(_as_bytes(A      )      )




  def 				__lowercase    (					self						:     int   ,A						:     Union[str, int, bytes]      ):






   '''simple docstring'''
   UpperCAmelCase__   :					Union[str, Any]   				=   self._split_mda.copy()
   UpperCAmelCase__   :					Union[str, Any]   				=   _as_bytes(A      )
   mda.update(A      )
   # Convert to integer with hexadecimal conversion
   return int(mda.hexdigest()   ,16      )








"""simple docstring"""




from math import factorial
def 					lowerCAmelCase  (   __UpperCamelCase							,      __UpperCamelCase ):
 '''simple docstring'''





 return factorial(__UpperCamelCase ) / (factorial(__UpperCamelCase ) * factorial(n - r ))
def 					lowerCAmelCase  (   ):
 '''simple docstring'''





 UpperCAmelCase__   :					Any   				=   0

 for i in range(1							,      101 ):
  for j in range(1							,      i + 1 ):
   if combinations(__UpperCamelCase							,      __UpperCamelCase ) > 1e6:
    total += 1
 return total


if __name__ == "__main__":
      print(solution())





