Match Score
Time limit1sMemory limit1024 MB
Count how many A and B characters are in a goal record string and print the score as X : Y.
- Level
Easy1 of 10
- Topics
- String
- Solved
- No attempts yet
Statement
Algogród and Bajtocja play the final of the World Handball Championship. Bajtosia, a sports analyst, carefully records every goal. Each time a team scores, she writes A or B on a sheet of paper, where A means a goal for Algogród and B means a goal for Bajtocja.
One player accidentally hit the ball into the screen that shows the match score. Can you tell the current score from Bajtosia's notes?
Input
The first and only line of input contains a non-empty string made of the letters A and B, which is Bajtosia's record. A is a goal for Algogród and B is a goal for Bajtocja. The length of the string does not exceed 100,000 characters.
Output
Print one line in the form X : Y, where X is the number of goals scored by Algogród and Y is the number of goals scored by Bajtocja. Separate the numbers from the colon with a single space.