Computer Science, asked by divyashrivas13, 2 months ago

You are an editor for a newspaper specialising in maths topic.ayou have written the headline fro an article to be week's release.
The headline is string S with length N and contains only three characters "a" "b" "c".As impressive as is sound.Your supervisor thinks otherwise. He asked you to impose it and has given you a integer K.you are asked to choose at- most K consecutive characters in the headlines and changes all of the characters of your choice.However, you can do this only one .
You have determined that the happiness of your supervisor is equal to the maximum number of consecutive characters that are the same .you have to determine the maximum happiness possible after the change .
Input format:
The first line contains string S denoting the headline
The next line contains an integer K denoting the man consecutive characters you can choose .​

Answers

Answered by monikarani55
0

Answer:

Mark me as brainliest I will follo you

Similar questions