G.W. Coding Contest 3 P4: Colourful Arguement
Fred and Fblue are having a heated argument about which colour is better, red or blue, so they hold a vote to determine who’s correct. They’ve assigned you to count the \(N\) votes they’ve collected. Unfortunately, Fred is a dirty cheater, and secretly added an extra vote in favour of red! Due to your tight morals, you want to make sure you disregard that vote.
The first line of input will contain \(\{\text{1 } \leq N \leq 20 \}\).
The second line of input will contain a sequence of \(N\) characters, either ‘R’ or ‘B’ representing the votes for red or blue respectively.
The output should be one of three possibilities:
“Red”, if red has the most votes
“Blue”, if blue has the most votes
“Purple”, if the votes are tied
Sample Input 1:
Sample Output 1:
Sample Input 2:
Sample Output 2:
Submit Solution