2025 Coding Team Tryouts P1 - Bob's Test


Submit solution

Points: 2 (partial)
Time limit: 1.0s
Memory limit: 256M

Author:
Problem type

Bob just did a test consisting of \(N\) (\(1 \le N \le 10^5\)) true (\(T\)) and false (\(F\)) questions. For each question, he either answered \(T\) or \(F\).

His answers are represented by the string \(A\) of length \(N\), where character \(i\) in the string represents his answer to question \(i\).
There is also the string \(B\) also of length \(N\), where character \(i\) represents the correct answer to question \(i\).

Given \(A\) and \(B\), how many questions did Bob answer correctly?

Input Specification

The first line contains the integer \(N\).
The next line contains the string \(A\).
The following line contains the string \(B\).

Output Specification

How many questions did Bob answer correctly?

Sample Input

4
TFTF
TFFT

Sample Output

2

Bob got the first \(2\) questions right, and the last \(2\) wrong.
In total, he answered \(2\) questions correctly.


Comments

There are no comments at the moment.