#K41192. Minimum Operations to Equal Strings
Minimum Operations to Equal Strings
Minimum Operations to Equal Strings
Given two strings a and b of equal length, determine the minimum number of operations required to make them identical by replacing any character in a with any lowercase English letter. Essentially, you need to count the number of positions at which the characters differ. Mathematically, for each index \(i\), if \(a_i \neq b_i\), then one operation is needed.
You will be given multiple query pairs. For each query, compute and output the number of differing positions between the two strings.
inputFormat
The input is read from standard input (stdin).
The first line contains an integer (T) denoting the number of queries. Each query consists of two subsequent lines, where each line contains a string. It is guaranteed that both strings in a query have the same length.
outputFormat
For each query, output a single integer on a new line representing the minimum number of operations needed to make the two strings identical.## sample
3
abc
bcd
aaa
bbb
abcdef
ghijkl
3
3
6
</p>