





from __future__ import annotations
def     A__					(						SCREAMING_SNAKE_CASE_      :			list[int | float]							,  SCREAMING_SNAKE_CASE_      :			int							,  SCREAMING_SNAKE_CASE_      :			int	)     ->     int | float:






   """simple docstring"""







   if len(SCREAMING_SNAKE_CASE_	) == 0:
      raise ValueError('''find_min() arg is an empty sequence'''	)
   if (
       left >= len(SCREAMING_SNAKE_CASE_	)
       or left < -len(SCREAMING_SNAKE_CASE_	)
       or right >= len(SCREAMING_SNAKE_CASE_	)
       or right < -len(SCREAMING_SNAKE_CASE_	)
   ):
      raise IndexError('''list index out of range'''	)
   if left == right:
      return nums[left]
   _UpperCAmelCase											=      (left + right) >> 1  # the middle
   _UpperCAmelCase											=      find_min(SCREAMING_SNAKE_CASE_							,  SCREAMING_SNAKE_CASE_							,  SCREAMING_SNAKE_CASE_	)  # find min in range[left, mid]
   _UpperCAmelCase											=      find_min(SCREAMING_SNAKE_CASE_							,  mid + 1							,  SCREAMING_SNAKE_CASE_	)  # find min in range[mid + 1, right]

   return left_min if left_min <= right_min else right_min


if __name__ == "__main__":
       import doctest

       doctest.testmod(verbose=True)






import os
import sys
import time

from . import transposition_cipher as trans_cipher
def     A__					(						)     ->     None:






   """simple docstring"""







   _UpperCAmelCase											=      '''Prehistoric Men.txt'''
   _UpperCAmelCase											=      '''Output.txt'''
   _UpperCAmelCase											=      int(input('''Enter key: '''	)	)
   _UpperCAmelCase											=      input('''Encrypt/Decrypt [e/d]: '''	)

   if not os.path.exists(SCREAMING_SNAKE_CASE_	):
      print(F'''File {input_file} does not exist. Quitting...'''	)
      sys.exit()
   if os.path.exists(SCREAMING_SNAKE_CASE_	):
      print(F'''Overwrite {output_file}? [y/n]'''	)
      _UpperCAmelCase											=      input('''> '''	)
      if not response.lower().startswith('''y'''	):
         sys.exit()

   _UpperCAmelCase											=      time.time()
   if mode.lower().startswith('''e'''	):
      with open(SCREAMING_SNAKE_CASE_	) as f:
         _UpperCAmelCase											=      f.read()
      _UpperCAmelCase											=      trans_cipher.encrypt_message(SCREAMING_SNAKE_CASE_							,  SCREAMING_SNAKE_CASE_	)
   elif mode.lower().startswith('''d'''	):
      with open(SCREAMING_SNAKE_CASE_	) as f:
         _UpperCAmelCase											=      f.read()
      _UpperCAmelCase											=      trans_cipher.decrypt_message(SCREAMING_SNAKE_CASE_							,  SCREAMING_SNAKE_CASE_	)

   with open(SCREAMING_SNAKE_CASE_							,  '''w'''	) as output_obj:
      output_obj.write(SCREAMING_SNAKE_CASE_	)

   _UpperCAmelCase											=      round(time.time() - start_time							,  2	)
   print(('''Done (''', total_time, '''seconds )''')	)


if __name__ == "__main__":
   main()