#C7378. Minimum Operations to Transform Strings

    ID: 51242 Type: Default 1000ms 256MiB

Minimum Operations to Transform Strings

Minimum Operations to Transform Strings

Given two strings (A) and (B) of equal length, determine the minimum number of operations required to transform string (A) into string (B). In one operation, you can change a single character in (A) so that it matches the corresponding character in (B). Formally, if (n) is the length of the strings, the answer is given by

[ \text{operations} = \sum_{i=1}^{n} \mathbf{1}_{{A_i \neq B_i}} ]

Your solution should read input from standard input and output the result to standard output.

inputFormat

The input consists of two lines. The first line contains the string (A) and the second line contains the string (B). It is guaranteed that both strings have the same length.

outputFormat

Output a single integer representing the minimum number of operations required to transform string (A) into string (B).## sample

abc
def
3