Count It!

Time Limit: 2000/1000MS (Java/Others) Memory Limit: 128000/64000KB (Java/Others)

Problem Description

There are N xiaopengyou in the class. One day teacher HU ask a question in the class and several students raise their hands.
Teacher HU found that not all students raise their right hand which means there are many students are used to useing their left hand.
Now Teacher HU want to know what is the maximal possible number and minimal possible number of the students who use left hands in his class.

Input

There are multiple test cases.
The first line contains an integer N (1 ≤ N ≤ 1000)
The next line contains a non-empty string only contains character 'L' and 'R' indicating that when teacher HU ask the question, the condition of the student who raise hand.
If the character is 'L', that means one student raise his/her left hand; vice versa.

Output

For each test case, output two integers indicating the maximal possible number and minimal possible number of the students who use left hands in his class.

Sample Input

3
LLR
4
LRL

Sample Output

2 2
3 2

Source

dut200901102

Manager

Information
Solved Number130
Submit Number340
Problem Tags
implementation
strings
No tag edit access
温馨提示:AC后可以编辑标签哦. ^-^
Login
LoginCancel