'''simple docstring'''





from bisect import bisect
from itertools import accumulate





def 	lowerCAmelCase_				(					snake_case_       : Optional[int]					,    snake_case_       : Optional[Any]					,    snake_case_       : Dict					,    snake_case_       : str			)    ->      int:


     '''simple docstring'''




     UpperCAmelCase_           =   sorted(zip(__UpperCamelCase					,    __UpperCamelCase			)					,    key=lambda snake_case_			: x[0] / x[1]					,    reverse=__UpperCamelCase			)
     UpperCAmelCase_           =   [i[0] for i in r], [i[1] for i in r]
     UpperCAmelCase_           =   list(accumulate(__UpperCamelCase			)			)
     UpperCAmelCase_           =   bisect(__UpperCamelCase					,    __UpperCamelCase			)
     return (
         0
         if k == 0
         else sum(vl[:k]			) + (w - acc[k - 1]) * (vl[k]) / (wt[k])
         if k != n
         else sum(vl[:k]			)
     )


if __name__ == "__main__":
    import doctest

    doctest.testmod()









import string


def 			UpperCamelCase(  __UpperCamelCase							:		str ):
		for key in range(len(string.ascii_uppercase ) ):
				lowerCAmelCase_			:     List[Any]									= ''''''
				for symbol in message:
						if symbol in string.ascii_uppercase:
								lowerCAmelCase_			:     Optional[int]									= string.ascii_uppercase.find(__UpperCamelCase )
								lowerCAmelCase_			:     Optional[int]									= num - key
								if num < 0:
										lowerCAmelCase_			:     int									= num + len(string.ascii_uppercase )
								lowerCAmelCase_			:     int									= translated + string.ascii_uppercase[num]
						else:
								lowerCAmelCase_			:     Optional[int]									= translated + symbol
				print(f"""Decryption using Key #{key}: {translated}""" )


def 			UpperCamelCase(  ):
		lowerCAmelCase_			:     Dict									= input('''Encrypted message: ''' )
		lowerCAmelCase_			:     List[str]									= message.upper()
		decrypt(__UpperCamelCase )


if __name__ == "__main__":
						import doctest

						doctest.testmod()
						main()





