AtCoder Beginner Contest 172 - Minor Change

Given are strings S and T. Consider changing S to T by repeating the operation below. Find the minimum number of operations required to do so.
Operation: Choose one character of S and replace it with a different character.

-----Constraints-----
 - S and T have lengths between 1 and 2\times 10^5 (inclusive).
 - S and T consists of lowercase English letters.
 - S and T have equal lengths.

-----Input-----
Input is given from Standard Input in the following format:
S
T

-----Output-----
Print the answer.

-----Sample Input-----
cupofcoffee
cupofhottea

-----Sample Output-----
4

We can achieve the objective in four operations, such as the following:
 - First, replace the sixth character c with h.
 - Second, replace the eighth character f with t.
 - Third, replace the ninth character f with t.
 - Fourth, replace the eleventh character e with a.

Difficulty: EASY

Starter code:

Solutions:
a = 0
s = input()
t = input()
for i in range(len(s)):
	a += 1 if s[i] != t[i] else 0
print(a)


a = input().split()[0]
str = input().split()[0]
count = 0
for i in range(len(a)):
	if str[i] != a[i]:
		count = count + 1
print(count)


S = input()
T = input()
print(sum((i != j for (i, j) in zip(S, T))))


S = str(input())
T = str(input())
ans = 0
for i in range(len(S)):
	if S[i] != T[i]:
		ans += 1
print(ans)


S = input()
T = input()
index = [n for n in range(len(S)) if S[n] != T[n]]
print(len(index))


S = input()
T = input()
print(len(list(filter(lambda x: x[0] != x[1], zip(S, T)))))


s = input()
t = input()
l = 0
for i in range(len(s)):
	if s[i] != t[i]:
		l += 1
print(l)


s = input()
t = input()
cnt = 0
for (v1, v2) in zip(s, t):
	if v1 != v2:
		cnt += 1
print(cnt)


s = input()
t = input()
c = 0
for (x, y) in zip(s, t):
	if x != y:
		c += 1
print(c)


s = input()
t = input()
l = len(s)
print(len([i for i in range(l) if s[i] != t[i]]))


S = input()
T = input()
ans = 0
for (s, t) in zip(S, T):
	if s != t:
		ans += 1
print(ans)


s = input()
t = input()
print(sum((1 for (a, b) in zip(s, t) if a != b)))


s = input()
t = input()
print(sum((s[i] != t[i] for i in range(len(s)))))


s = input()
t = input()
c = 0
for (s1, t1) in zip(s, t):
	c += s1 != t1
print(c)


x = input()
y = input()
cnt = 0
for (i, j) in zip(x, y):
	if i != j:
		cnt += 1
print(cnt)


S = input()
T = input()
lst = [1 for (i, j) in zip(S, T) if i != j]
print(sum(lst))


S = input()
T = input()
res = sum((0 if s == t else 1 for (s, t) in zip(S, T)))
print(res)


s = input()
h = input()
count = 0
for i in range(len(s)):
	if s[i] != h[i]:
		s[i] == h[i]
		count += 1
print(count)


s = input()
t = input()
ans = 0
for i in range(len(s)):
	ans += s[i] != t[i]
print(ans)


S = list(input())
T = list(input())
print(sum((a != b for (a, b) in zip(S, T))))


s = input()
t = input()
print(sum((1 for (x, y) in zip(s, t) if x != y)))


s = input()
t = input()
cnt = 0
for (ss, tt) in zip(s, t):
	if ss != tt:
		cnt += 1
print(cnt)


S = input()
T = input()
print(sum((1 for i in range(len(S)) if S[i] != T[i])))


S = input()
T = input()
print(sum([s != t for (s, t) in zip(S, T)]))


S = input()
T = input()
print(len([1 for (s, t) in zip(list(S), list(T)) if s != t]))


s = input()
t = input()
r = 0
for i in range(len(s)):
	if not s[i] == t[i]:
		r += 1
print(r)


ans = 0
for (s_i, t_i) in zip(input(), input()):
	if s_i != t_i:
		ans += 1
print(ans)


a = input()
b = input()
n = len(a)
c = 0
for i in range(n):
	if a[i] != b[i]:
		c += 1
print(c)


str1 = input()
str2 = input()
count = 0
for i in range(len(str1)):
	if str1[i] != str2[i]:
		count += 1
print(count)


a = input()
b = input()
c = 0
for t in range(len(a)):
	if a[t] != b[t]:
		c += 1
print(c)


S = input()
T = input()
print(len([i for i in range(len(S)) if S[i] != T[i]]))


s1 = input()
s2 = input()
c = 0
for i in range(len(s1)):
	if s1[i] != s2[i]:
		c = c + 1
print(c)


s = input()
t = input()
ans = sum([1 for (i, j) in enumerate(s) if j != t[i]])
print(ans)


s = list(input())
t = list(input())
u = len(s)
ans = 0
for i in range(u):
	if s[i] != t[i]:
		ans += 1
print(ans)


s = input()
t = input()
n = len(s)
ans = 0
for i in range(n):
	if s[i] != t[i]:
		ans += 1
print(ans)


a = input()
b = input()
(k, i) = (0, 0)
while i < len(a):
	if a[i] != b[i]:
		k += 1
	i += 1
print(k)


S = input()
T = input()
a = 0
for n in range(len(S)):
	if S[n] != T[n]:
		a += 1
print(a)


s = input()
t = input()
ln = len(s)
cnt = 0
for i in range(ln):
	if s[i] != t[i]:
		cnt += 1
print(cnt)


S = input()
T = input()
p = 0
for i in range(0, len(S)):
	if S[i] == T[i]:
		pass
	else:
		p += 1
print(p)


import sys
from collections import deque, defaultdict, Counter
from itertools import accumulate, product, permutations, combinations
from operator import itemgetter
from bisect import bisect_left, bisect_right
from heapq import heappop, heappush
from math import ceil, floor, sqrt, gcd, inf
from copy import deepcopy
import numpy as np
import scipy as sp
INF = inf
MOD = 1000000007
s = input()
t = input()
tmp = 0
res = 0
for (i, j) in zip(s, t):
	if i != j:
		res += 1
print(res)


s = 0
S = input()
R = input()
for i in range(len(S)):
	if S[i] != R[i]:
		s += 1
print(s)


S = input()
T = input()
n = 0
for i in range(len(S)):
	n += S[i] != T[i]
print(n)


(s, t) = (input(), input())
r = 0
for (c, d) in zip(s, t):
	r += c != d
print(r)


print(sum((a != b for (a, b) in zip(input(), input()))))


s = input()
st = input()
n = len(s)
k = 0
for i in range(n):
	if s[i] != st[i]:
		k += 1
print(k)


s = input()
t = input()
a = 0
for (i, j) in zip(s, t):
	if i != j:
		a += 1
print(a)


s = input()
t = input()
print(sum((1 for i in range(len(s)) if s[i] != t[i])))


s = input()
a = input()
c = 0
for i in range(len(s)):
	if s[i] != a[i]:
		c += 1
print(c)


S = input()
T = input()
print(sum([1 if x[0] != x[1] else 0 for x in zip(S, T)]))


import sys, os.path
sys.setrecursionlimit(10 ** 5)

def mod():
	return 10 ** 9 + 7

def i():
	return sys.stdin.readline().strip()

def ii():
	return int(sys.stdin.readline())

def li():
	return list(sys.stdin.readline().strip())

def mii():
	return map(int, sys.stdin.readline().split())

def lii():
	return list(map(int, sys.stdin.readline().strip().split()))

def solve():
	a = li()
	b = li()
	c = 0
	for i in range(len(a)):
		if a[i] != b[i]:
			c += 1
	print(c)
for _ in range(1):
	solve()


S = input()
T = input()
cnt = 0
for (i, j) in zip(S, T):
	if i != j:
		cnt += 1
print(cnt)


s = input()
t = input()
ndif = sum((i != j for (i, j) in zip(s, t)))
print(ndif)


print(sum([s != t for (s, t) in zip(input(), input())]))


def main():
	s = input()
	t = input()
	print(sum((a != b for (a, b) in zip(s, t))))
main()


S = input()
T = input()
retval = len(S)
for i in range(len(S)):
	if S[i] == T[i]:
		retval -= 1
print(retval)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, bisect
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
import sys
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
stdin = sys.stdin
ni = lambda : int(ns())
nf = lambda : float(ns())
na = lambda : list(map(int, stdin.readline().split()))
nb = lambda : list(map(float, stdin.readline().split()))
ns = lambda : stdin.readline().rstrip()
S = ns()
T = ns()
ans = 0
for (s, t) in zip(S, T):
	if s != t:
		ans += 1
print(ans)


s = input()
t = input()
ls = list(s)
lt = list(t)
result = 0
for data in range(len(ls)):
	if ls[data] != lt[data]:
		result += 1
print(result)


S = input()
T = input()
ans = 0
for (s, t) in zip(S, T):
	ans += s != t
print(ans)


s = list(input())
t = list(input())
o = 0
for (i, j) in zip(s, t):
	if i != j:
		o += 1
print(o)


S = input()
T = input()
cnt = 0
for i in range(len(S)):
	if S[i] != T[i]:
		cnt += 1
print(cnt)


a = input()
b = input()
r = 0
for i in range(len(a)):
	if a[i] != b[i]:
		r += 1
print(r)


S = input()
T = input()
print([s == t for (s, t) in zip(S, T)].count(False))


A = input()
B = input()
cnt = 0
for i in range(len(A)):
	if A[i] != B[i]:
		cnt += 1
print(cnt)


ss = list(input())
tt = list(input())
cnt = 0
for i in range(len(ss)):
	if ss[i] != tt[i]:
		cnt += 1
print(cnt)


n = input()
t = input()
c = 0
for i in range(len(n)):
	if n[i] != t[i]:
		c += 1
print(c)


s = input()
t = input()
a = 0
for x in range(len(s)):
	if s[x] != t[x]:
		a += 1
print(a)


S = input()
T = input()
print(len([0 for (s, t) in zip(S, T) if s != t]))


s = input()
t = input()
ans = 0
for (i, _) in enumerate(s):
	if s[i] != t[i]:
		ans += 1
print(ans)


S = input()
T = input()
print([S[i] != T[i] for i in range(len(S))].count(True))


import sys
sys.setrecursionlimit(1000000)
from collections import deque
S = input()
T = input()
l = len(S)
count = 0
for i in range(l):
	if S[i] != T[i]:
		count += 1
print(count)


s = input()
t = input()
ss = 0
for k in range(len(s)):
	ss += s[k] != t[k]
print(ss)


S = input()
T = input()
ret = sum((d[0] != d[1] for d in zip(S, T)))
print(ret)


a = input()
b = input()
res = 0
for (i, j) in zip(a, b):
	if i != j:
		res += 1
print(res)


def ans172(S: str, T: str):
	ans_count = 0
	for i in range(len(S)):
		if S[i] != T[i]:
			ans_count += 1
	return ans_count

def __starting_point():
	S = input()
	T = input()
	print(ans172(S, T))
__starting_point()


s = input()
t = input()
ans = 0
for (a, b) in zip(s, t):
	ans += a != b
print(ans)


s = input()
t = input()
result = len([a for (a, b) in zip(s, t) if a != b])
print(result)


print(sum((i != j for (i, j) in zip(input(), input()))))


str1 = input()
str2 = input()
idx = 0
cnt = 0
for _ in range(len(str1)):
	if str1[idx] != str2[idx]:
		cnt += 1
	idx += 1
print(cnt)


print(sum((x != y for (x, y) in zip(input(), input()))))


ans = 0
for (i, j) in zip(input(), input()):
	if i != j:
		ans += 1
print(ans)


S = list(input())
T = list(input())
print(sum(map(lambda x: x[0] != x[1], zip(S, T))))


S = input()
T = input()
print(sum([x != y for (x, y) in zip(S, T)]))


S = input()
T = input()
cc = 0
for i in range(len(S)):
	cc += int(S[i] != T[i])
print(cc)


S = input()
T = input()
l = len(S)
C = 0
for i in range(l):
	if not S[i] == T[i]:
		C = C + 1
print(C)


s = input()
t = input()

def counts(s, t):
	cnt = 0
	length = len(s)
	for i in range(length):
		if s[i] != t[i]:
			cnt += 1
	return cnt
print(counts(s, t))


s = input()
t = input()
ans = 0
for (s, t) in zip(s, t):
	if s != t:
		ans += 1
print(ans)


S = input()
T = input()
res = 0
for i in range(len(S)):
	res += S[i] != T[i]
print(res)


s = input()
t = input()
cnt = 0
for (i, c) in enumerate(s):
	if c != t[i]:
		cnt += 1
print(cnt)


print(len([1 for (s, t) in zip(input(), input()) if s != t]))


s = input()
t = input()
result = [x != y for (x, y) in zip(s, t)]
print(sum(result))


a = input()
b = input()
c = 0
for (A, B) in zip(a, b):
	if A != B:
		c += 1
print(c)


S = input()
T = input()
print(len([i for (i, j) in zip(S, T) if i != j]))


print(sum((c1 != c2 for (c1, c2) in zip(input(), input()))))


print(sum([si != ti for (si, ti) in zip(*(input(), input()))]))


S = input()
T = input()
print(sum([S[i] != T[i] for i in range(len(S))]))


S = input()
T = input()
print(sum([1 for (s, t) in zip(S, T) if s != t]))


def answer(s: str, t: str) -> int:
	count = 0
	for i in range(len(s)):
		if s[i] != t[i]:
			count += 1
	return count

def main():
	s = input()
	t = input()
	print(answer(s, t))

def __starting_point():
	main()
__starting_point()


print(sum((s != t for (s, t) in zip(*open(0)))))


s = input()
t = input()
print(sum((a != b for (a, b) in zip(s, t))))


(S, T) = (input(), input())
print(len([s for (i, s) in enumerate(S) if s != T[i]]))


s = input()
t = input()
ans = 0
for (i, j) in zip(s, t):
	ans += i != j
print(ans)


ret = 0
S = input()
T = input()
print(len([S[i] for i in range(len(S)) if S[i] != T[i]]))


def main():
	s = input()
	t = input()
	ans = 0
	for (i, j) in zip(s, t):
		if i != j:
			ans += 1
	print(ans)

def __starting_point():
	main()
__starting_point()


s1 = input()
s2 = input()
print(sum([ch1 != ch2 for (ch1, ch2) in zip(s1, s2)]))


sf = input()
tf = input()
print(sum((s != t for (s, t) in zip(sf, tf))))


S = input()
T = input()
print(sum([c1 != c2 for (c1, c2) in zip(S, T)]))


def function():
	pass
	S = input()
	T = input()
	count = 0
	for i in range(len(S)):
		if S[i] != T[i]:
			count += 1
	print(count)
function()


S = input()
T = input()
print(sum((1 for (c1, c2) in zip(S, T) if c1 != c2)))


x = input()
y = input()
l = 0
for i in range(len(x)):
	if x[i] != y[i]:
		l += 1
print(l)


(s, t) = (input(), input())
print(len([*filter(lambda x: s[x] != t[x], range(len(s)))]))


s = input()
t = input()
c = 0
for i in range(len(s)):
	c += s[i] != t[i]
print(c)


s = input()
t = input()
c = 0
for (i, j) in zip(s, t):
	if not i == j:
		c += 1
print(c)


s = input()
t = input()
count = 0
for i in range(0, len(s)):
	if s[i] == t[i]:
		continue
	else:
		count += 1
print(count)


S = input()
T = input()
R = len(S)
A = 0
for k in range(R):
	if S[k - 1] != T[k - 1]:
		A += 1
print(A)


s = input()
t = input()
ans = sum((1 for (si, ti) in zip(s, t) if si != ti))
print(ans)


(s, t) = (input(), input())
print(sum(map(lambda x: 1 if x[0] != x[1] else 0, zip(s, t))))


S = list(input())
T = list(input())
c = 0
for (x, y) in zip(S, T):
	c += 1 - (x == y)
print(c)


print(sum([1 for (s, t) in zip(list(input()), list(input())) if s != t]))


print(len(list(filter(lambda x: x[0] != x[1], zip(input(), input())))))


s = list(input())
t = list(input())
count = 0
for i in range(len(s)):
	if s[i] == t[i]:
		continue
	elif s[i] != t[i]:
		t[i] = s[i]
		count += 1
print(count)


s = input()
t = input()
count = int(0)
for i in range(len(s)):
	if not s[i] == t[i]:
		count += 1
print(count)


print(sum((c != d for (c, d) in zip(input(), input()))))


s1 = input()
s2 = input()
ans = sum((s1[i] != s2[i] for i in range(len(s1))))
print(ans)


s = list(input())
t = list(input())
print(sum([1 for (i, j) in zip(s, t) if i != j]))


n = str(input())
m = str(input())
ans = 0
for i in range(len(n)):
	if n[i] != m[i]:
		ans += 1
print(ans)


a = input()
b = input()
ans = 0
for (p, q) in zip(a, b):
	if p != q:
		ans += 1
print(ans)


S = input()
T = input()
print(len([1 for (a, b) in zip(S, T) if a != b]))


S = input()
T = input()
count = 0
for i in range(len(S)):
	count += S[i] != T[i]
print(count)


s = list(map(str, input()))
t = list(map(str, input()))
ans = 0
for i in range(len(s)):
	if s[i] != t[i]:
		ans += 1
print(ans)


print(sum((a != b for (a, b) in zip(*open(0)))))


s = input()
t = input()
print(sum([si != ti for (si, ti) in zip(s, t)]))


(S, T) = [input() for _ in range(2)]
print(sum((s != t for (s, t) in zip(S, T))))


s = input()
t = input()
ans = 0
for (sc, tc) in zip(s, t):
	ans += sc != tc
print(ans)


n = input()
p = input()
x = 0
for i in range(len(n)):
	if n[i] != p[i]:
		x += 1
print(x)


a = input()
b = input()
cnt = 0
for i in range(len(a)):
	cnt += a[i] != b[i]
print(cnt)


S = input()
T = input()
n = len(S)
for i in range(n):
	if S[i] == T[i]:
		n -= 1
print(n)


s = input()
t = input()
print(sum(map(lambda x: int(x[0] != x[1]), zip(s, t))))


s = input()
t = input()
print(sum([1 for (index, char) in enumerate(s) if t[index] != char]))


s = list(input())
t = list(input())
print(sum([x != y for (x, y) in zip(s, t)]))


(s, t) = (input(), input())
print(len([1 for (i, j) in zip(s, t) if i != j]))


S = input()
T = input()
print(len([x for x in map(set, zip(S, T)) if len(x) == 2]))


s = input()
t = input()
print(len(list(filter(lambda xy: xy[0] != xy[1], zip(s, t)))))


S = list(input())
T = list(input())
count = len(S)
ans = 0
for i in range(count):
	if S[i] != T[i]:
		ans += 1
	else:
		pass
print(ans)


count = 0
for (s, t) in zip(input(), input()):
	count += s != t
print(count)


S = input()
T = input()
l = len(S)
count = 0
for i in range(l):
	if S[i] != T[i]:
		count += 1
print(count)


s = str(input())
t = str(input())
score = 0
le = len(s)
for i in range(le):
	if s[i] != t[i]:
		score += 1
print(score)


(S, T) = (input(), input())
print(len(list(filter(lambda i: S[i] != T[i], range(len(S))))))


s = [i for i in input()]
t = [j for j in input()]
count = 0
for (k, l) in zip(s, t):
	if k != l:
		count += 1
print(count)


a = list(str(input()))
b = list(str(input()))
count = 0
for i in range(len(a)):
	if a[i] != b[i]:
		count += 1
print(count)


s = input()
t = input()
count = 0
for (i, j) in enumerate(s):
	if j != t[i]:
		count += 1
print(count)


s = input()
t = input()
if s == t:
	print(0)
else:
	p = -1
	ans = 0
	for i in s:
		p += 1
		if i != t[p]:
			ans += 1
	print(ans)


s1 = input()
s2 = input()
print(sum([a1 != a2 for (a1, a2) in zip(s1, s2)]))


s = input()
t = input()
S = [x for x in s]
T = [y for y in t]
count = 0
for i in range(len(s)):
	if S[i] != T[i]:
		count += 1
print(count)


s = input()
t = input()
print(sum((True for (x, y) in zip(s, t) if x != y)))


c1 = input()
c2 = input()
print(sum([1 for i in range(len(c1)) if c1[i] != c2[i]]))


def main():
	s = input()
	t = input()
	ans = 0
	for i in range(len(s)):
		if s[i] != t[i]:
			ans += 1
	print(ans)
	return

def __starting_point():
	main()
__starting_point()


n = list(input())
n1 = list(input())
i = 0
cou = 0
while i != len(n):
	if n[i] != n1[i]:
		cou += 1
	i += 1
print(cou)


print(sum([1 if s != t else 0 for (s, t) in zip(input(), input())]))