[BOJ 6784] Multiple Choice

View as PDF

Submit solution

Points: 1
Time limit: 2.0s
Memory limit: 512M

Problem type
Allowed languages
Assembly, Awk, C, C++, Java, Pascal, Perl, Python, Sed, Text

Your teacher likes to give multiple choice tests. One benefit of giving these tests is that they are easy to mark, given an answer key. The other benefit is that students believe they have a one-in-five chance of getting the correct answer, assuming the multiple choice possibilities are A,B,C,D or E.</p>

Write a program that your teacher can use to grade one multiple choice test.

입력 형식

The input will contain the number N (0 < N < 10000) followed by 2N lines. The 2N lines are composed of N lines of student responses (with one of A,B,C,D or E on each line), followed by N lines of correct answers (with one of A,B,C,D or E on each line), in the same order as the student answered the questions (that is, if line i is the student response, then line N +i contains the correct answer to that question).

출력 형식

Output the integer C (0 ≤ C ≤ N) which corresponds to the number of questions the student answered correctly.

예제 입력 1

3
A
B
C
A
C
B

예제 출력 1

1

예제 입력 2

3
A
A
A
A
B
A

예제 출력 2

2

Comments

There are no comments at the moment.