题目描述
Problem Description
Given three strings $ A, B, C $, each consisting of lowercase English letters and having a length of $ N $.
Our goal is to make these three strings equal. To achieve this, you can repeatedly perform the following operation:
- Operation: Choose one of the strings $ A, B, C $ and specify an integer $ i $ between $ 1 $ and $ N $ inclusive. Then, change the $ i $-th character from the beginning of the chosen string to any other lowercase English letter.
What is the minimum number of operations required to achieve the goal?
Input Format
The input is given from the standard input in the following format:
$ N $ $ A $ $ B $ $ C $
Output Format
Output the minimum number of operations required.
Sample Input and Output
Sample Input #1
4
west
east
wait
Sample Output #1
3
Sample Input #2
9
different
different
different
Sample Output #2
0
Sample Input #3
7
zenkoku
touitsu
program
Sample Output #3
13
Notes/Hints
Constraints
- $1 \leq N \leq 100$
- $ A, B, C $ are strings of length $ N $.
- Each character in $ A, B, C $ is a lowercase English letter.
Sample Explanation 1
In this example, initially $ A = $ west, $ B = $ east, $ C = $ wait. The goal can be achieved with a minimum of 3 operations as follows:
- Change the 2nd character of $ A $ to a. $ A $ becomes wast.
- Change the 1st character of $ B $ to w. $ B $ becomes wast.
- Change the 3rd character of $ C $ to s. $ C $ becomes wast.
Sample Explanation 2
If $ A, B, C $ are already equal from the beginning, the required number of operations is $ 0 $.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分