-->
当前位置:首页 > 题库

PROGRAMMING:Automatic scoring

Luz5年前 (2021-05-10)题库406
The 21 point system was used in the early stage of table tennis. After the reform, the 11 point system is now the mainstream of the competition system. Now we need to analyze the statistical data of many years of competition.
The specific analysis is carried out in the following ways. First, the winners and losers of each ball in the game are listed in a table, and then the game results of both sides under the 11 point system and the 21 point system are calculated respectively (up to the end of the record).
For example, there is a record (W means that Chinese players get one point, l means that foreign opponents get one point)
WWWWWWWWWWWWWWWWWWWWWWLW。< br>
Under the 11 point system, the result of the game is that our players win 11-0 in the first set, 11-0 in the second set, and are in the third set. The current score is 1-1. Under the 21 point system, the result of the game is that our team won 21-0 in the first set, and the score is 2-1 in the second set. If a game has just started, the score is 0-0.
Your program is to input a series of game information (WL form), output the correct results.
###Input format:
Each input file contains several lines of strings (up to 20 letters per line), which are composed of uppercase W, l and E. Where e means the end of the game information, the program should ignore all the content after E.
###Output format:
The output consists of two parts, each part has several lines, and each line corresponds to the score of a game (according to the order of game information input). The first part is the result under the 11 point system, and the second part is the result under the 21 point system. The two parts are separated by a blank line.
###Input example:
Here is a set of inputs. For example:
```in
WWWWWWWWWWWWWWWWWWWW
WWLWE
```
###Output example:
The corresponding output is given here. For example:
```out
11:0
11:0
1:1
21:0
2:1
```







answer:If there is no answer, please comment