100 atcoder#ABC172B. [ABC172B] Minor Change
[ABC172B] Minor Change
Score : points
Problem Statement
Given are strings and . Consider changing to by repeating the operation below. Find the minimum number of operations required to do so.
Operation: Choose one character of and replace it with a different character.
Constraints
- and have lengths between and (inclusive).
- and consists of lowercase English letters.
- and have equal lengths.
Input
Input is given from Standard Input in the following format:
Output
Print the answer.
cupofcoffee
cupofhottea
4
We can achieve the objective in four operations, such as the following:
- First, replace the sixth character
c
withh
. - Second, replace the eighth character
f
witht
. - Third, replace the ninth character
f
witht
. - Fourth, replace the eleventh character
e
witha
.
abcde
bcdea
5
apple
apple
0
No operations may be needed to achieve the objective.