I. Dr.Hjjawi and the MCQ

I. Dr.Hjjawi and the MCQ
time limit per test
1.5 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output
Dr.Hjjawi decided to make a special multiple choice questions exam MCQ.
for each question in the exam there is 5 answers (from a to e) but only one of them is true.
After the exam, Dr.Hjjawi told his student that is the answer for all questions was the same letter (for example : all the correct answers are b), but without telling them what is the letter.
Ayoub was nervous after the exam, so he wants you to tell him what is the minimum number of true answers he would get, and the maximum number true answers he would get.
Input
The first line of input contains integer n (1n1000), denotes the number of questions.
The second line of input contains string s of length n, the ith character of the string denotes Ayoub's answer for the ith question.
it is guaranteed that the string only consists of {'a','b','c','d','e'}.
Output
Print two integers, the minimum number of true answers, and the maximum number true answers.
Examples
input
Copy
10
aaaaaabcde
output
Copy
1 6
input
Copy
3
aaa
output
Copy
0 3

Comments

Popular posts from this blog

Access and modify all the resources of our Wiki.js using WikiJS API

MySQL Multi Source Master Slave Replication using GTID

How to pass parameters in webhook?