Variable to store the frequency of the least frequent of first K alphabets
minimum = mp [ ' A ' ] NEW_LINE for i in range ( 1 , K ) : NEW_LINE INDENT minimum = min ( minimum , mp [ chr ( i + ord ( ' A ' ) ) ] ) NEW_LINE DEDENT return ( minimum * K ) NEW_LINE