you are playing a badminton consisting of n rounds with your friends. if current score is greater than or equal to your friend current score, you serve the round.else,your friend serve the round the playback of the game is game is as string of n character.if i-thcharacter is w if the serve of the i-th round won the i-th round,else the character is L . print your final score and youy friend final score seperated by a space using oython program
Answers
Answered by
0
Answer:
Input : N = 3
Output : 2
Maximum games winner can play = 2
Assume that player are P1, P2 and P3
First, two players will play let (P1, P2)
Now winner will play against P3,
making total games played by winner = 2
Input : N = 4
Output : 2
Maximum games winner can play = 2
Assume that player are P1, P2, P3 and P4
First two pairs will play lets (P1, P2) and
(P3, P4). Now winner of these two games will
play against each other, making total games
played by winner = 2
Similar questions