#AJ2401. Rings(初级)
Rings(初级)
Description
ACSL Rings is a 2-player game where the object is to score points by tossing a ball through one of the 5 rings. Points are awarded as follows:
- Through the aqua or red ring - 1 point
- Through the orange or green ring - 3 points
- Through the black ring - 6 points
We will use a single letter to represent each of the colors: aqua (A), red (R), orange (O), green (G), and black (B).
You will be given 2 strings representing each player’s results for all tosses that go through one of the rings. Output a string containing each player’s score with the larger score first. If both players have the same score, it doesn’t matter which one appears first.
Input Format
The input will consist of 2 strings as described above. Each string will be no more than 100 characters.
Output Format
Output the two scores separated by a single space with the larger score first.
BRAG
BOB
15 11
AABBOOGG
BAROBA
26 18
GBORABORBA
BAAAAOORGGGB
32 31
OORRRGRBBRRAAABB
AAAAGRRRRGRRRBBOO
42 35
BARROGGBBGO
BBAAAARRRGGGOOOO
40 36