Problem:


Score : 200 points

Problem Statement

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 1

cupofcoffee
cupofhottea

Sample Output 1

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.

Sample Input 2

abcde
bcdea

Sample Output 2

5

Sample Input 3

apple
apple

Sample Output 3

0

No operations may be needed to achieve the objective.



Sample input:
cupofcoffee
cupofhottea


Sample output:
4

Submission status: Accepted

Solution code:
def main():
    s = input()
    t = input()
    ans = 0
    for ss,tt in zip(s,t):
        if ss != tt:
            ans += 1
    print(ans)
    return
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()


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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))  #空白なし
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())  #空白あり
def LS2(): return list(sys.stdin.readline().rstrip())  #空白なし

S = LS2()
T = LS2()

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

print(ans)

Submission status: Accepted

Solution code:
str1 = input()
str2 = input()

diff_cnt = 0

for i in range(len(str1)):
    if str1[i] != str2[i]:
        diff_cnt += 1

print(diff_cnt)

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# B - Minor Change

S = str(input())
T = str(input())

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s, t = input(), input()

cnt = 0
for si, ti in zip(s, t):
    if si != ti:
        cnt += 1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(2 * 10**6)


def inpl():
    return list(map(int, input().split()))


def main():
    S = input().strip()
    T = input().strip()
    print(len([False for s, t in zip(S, T) if s != t]))
    return


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = input()
t = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
T = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
t = input()

c = 0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.readline
s=input().rstrip()
t=input().rstrip()
n=len(s)
ans=0
for i in range(n):
    if s[i]==t[i]:
        pass
    else:
        ans+=1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
T = input()
count = 0

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

Submission status: Accepted

Solution code:
def main():
    S = input()
    T = input()
    r = 0
    for i in range(len(S)):
        if S[i] != T[i]:
            r += 1
    return r
print(main())

Submission status: Accepted

Solution code:
import sys
# import re
import math
import collections
# import decimal
import bisect
import itertools
import fractions
# import functools
import copy
# import heapq
import decimal
# import statistics
import queue

# import numpy as np

sys.setrecursionlimit(10000001)
INF = 10 ** 16
MOD = 10 ** 9 + 7
# MOD = 998244353

ni = lambda: int(sys.stdin.readline())
ns = lambda: map(int, sys.stdin.readline().split())
na = lambda: list(map(int, sys.stdin.readline().split()))


# ===CODE===

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
t = input()

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

Submission status: Accepted

Solution code:
S = list(input())
T = list(input())

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

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2, gcd
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7
from decimal import *
#import numpy as np
#decimal.getcontext().prec = 10

S = input()
T = input()

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
t = input()

cnt = 0
for k, v in zip(s, t):
    if k != v:
        cnt += 1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=lambda:input()
I=lambda:int(input())
L=lambda:list(map(int,input().split()))
LS=lambda:list(map(str,input().split()))

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

Submission status: Accepted

Solution code:
def solve():
    ans = 0
    S = input()
    T = input()
    for i in range(len(S)):
        if S[i]!=T[i]:
            ans += 1
    return ans
print(solve())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
t = input()
ans = sum([1 if s[i] != t[i] else 0 for i in range(len(s))])
print(ans)

Submission status: Accepted

Solution code:
S = input()
T = input()
print(sum(s!=t for s,t in zip(S, T)))

Submission status: Accepted

Solution code:
import sys,queue,math,copy,itertools,bisect,collections,heapq

def main():
    sys.setrecursionlimit(10**7)
    INF = 10**18
    MOD = 10**9 + 7
    LI = lambda : [int(x) for x in sys.stdin.readline().split()]
    _LI = lambda : [-int(x) for x in sys.stdin.readline().split()]
    NI = lambda : int(sys.stdin.readline())
    SI = lambda : sys.stdin.readline().rstrip()
    DD = ((1,0),(0,1),(-1,0),(0,-1))

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

s = input()
t = input()

res = 0

for i in range(len(s)):
	if s[i] != t[i]:
		res += 1

print(res)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10000000)
import math
import bisect
from collections import deque
def input():
    return sys.stdin.readline()[:-1]

s = input()
t = input()
ans = 0

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

    print(cnt)    


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import math, sys
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from copy import deepcopy
from functools import lru_cache
from heapq import heapify, heappop, heappush
from itertools import accumulate, combinations, permutations
input = sys.stdin.readline
mod = 10**9 + 7
ns = lambda: input().strip()
ni = lambda: int(input().strip())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

def main():
    s = ns()
    t = ns()

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
S = input().strip()
T = input().strip()

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

Submission status: Accepted

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



if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
inf = 10 ** 18
mod = 10 ** 9 + 7

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

Submission status: Accepted

Solution code:
#import sys
MOD = 10 ** 9 + 7
INFI = 10**10
#input = sys.stdin.readline
import math
from collections import deque
import itertools
import heapq
#import bisect
from fractions import Fraction
import copy
from functools import lru_cache
from collections import defaultdict
import pprint

#oo=list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
# ko=list("abcdefghijklmnopqrstuvwxyz")

def sosuhante(n):
    for k in range(2, int(math.sqrt(n))+1):
        if n% k ==0:
            return False
    return True
def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def kingaku(a,b,n):
    keta=len(str(n))
    return a*n+b*keta

def my_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default

#    h,w,a,b = map(int, input().split())
#    c = [[0 for j in range(n)] for i in range(n)]

def ret(a):
    c=[None]*(len(a)-1)
    if len(a)==1:
        return a[0]
    elif len(a)==0:
        return 0
    for i in range(1,len(a)):
        c[i-1]=abs(a[i]-a[i-1])
    return ret(c)

def soinsubunkai(n):
    a = []
    i = 1
    while i*i <= n:
        if n % i == 0 and i!=1:
            a.append(i)
            n=n//i

        if n% i !=0 or i==1:
            i += 1
    nokori=[n]
    return a + nokori


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


if __name__ == "__main__":

    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
t = input()

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

print(ans)

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


def main():
    S = readline().decode('utf-8').strip()
    T = readline().decode('utf-8').strip()
    L = len(S)
    ans = 0
    for i in range(L):
        if S[i]!=T[i]:
            ans += 1

    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys 
input = lambda:sys.stdin.readline().strip()
s = input()
t = input()
ans = 0
for i in range(len(s)):
    if s[i]!=t[i]:
        ans+=1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin, setrecursionlimit
#input = stdin.buffer.readline
setrecursionlimit(10 ** 7)

from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
from collections import deque, defaultdict, Counter
from itertools import combinations, permutations, combinations_with_replacement
from itertools import accumulate
from math import ceil, sqrt, pi, radians, sin, cos

MOD = 10 ** 9 + 7
INF = 10 ** 18

#N = int(input())
S = input()
T = input()
#N, M = map(int, input().split())
#A = list(map(int, input().split()))
#A = [int(input()) for _ in range(N)]
#ABC = [list(map(int, input().split())) for _ in range(N)]

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

Submission status: Accepted

Solution code:
import sys
import numpy as np
import random
from decimal import Decimal
import itertools
import re
import bisect
from collections import deque, Counter
from functools import lru_cache

sys.setrecursionlimit(10**9)
INF = 10**13
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
def SERIES(n): return np.fromstring(sys.stdin.buffer.read(), dtype=np.int32, sep=' ')
def GRID(h,w): return np.fromstring(sys.stdin.buffer.read(), dtype=np.int32, sep=' ').reshape(h,-1)[:,:w]
def GRIDfromString(h,w): return np.frombuffer(sys.stdin.buffer.read(), 'S1').reshape(h,-1)[:,:w]
MOD = 1000000007

def main():
	s = list(S())
	t = list(S())
	count = 0
	for i in range(len(s)):
		if s[i] != t[i]:
			count += 1
	print(count)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left
from functools import reduce
from decimal import Decimal, getcontext
# input = sys.stdin.readline 
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_list(N): return [s_list() for _ in range(N)]
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7
num_list = []
str_list = []

def main():
    s = s_input()
    t = s_input()

    count = 0

    for i in range(len(s)):
        if s[i] != t[i]:
            count += 1

    print(count)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
t = input()
cnt = 0
for a, b in zip(s, t):
    if a != b:
        cnt += 1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
import sys

stdin = sys.stdin
ns = lambda: stdin.readline().rstrip() # ignore trailing spaces
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = input()
t = input()

answer = 0
for si, ti in zip(s, t):
    if si != ti:
        answer += 1

print(answer)

Submission status: Accepted

Solution code:
s = input()
t = input()

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

print(res)

Submission status: Accepted

Solution code:
S=input()
T=input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
INF = 10**9
mod = 10**9+7

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(input())
T = list(input())

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

Submission status: Accepted

Solution code:
def solve():
    S = input()
    T = input()

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

if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
import sys


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


def main():
    s = _s()
    t = _s()
    cnt = 0
    for si, ti in zip(s, t):
        if si != ti:
            cnt += 1
    return cnt


if __name__ == "__main__":
    print(main())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
#import numpy as np
import re
import math
from collections import defaultdict,deque,Counter
from fractions import Fraction
import bisect
import itertools
from itertools import accumulate
from copy import deepcopy
import heapq
import random
import time
import os
import sys
from functools import lru_cache,reduce
readline=sys.stdin.readline
sys.setrecursionlimit(100000)
alp="abcdefghijklmnopqrstuvwxyz"
numbers="0123456789"
mod=int(10**9+7)
inf=int(10**19)
class Set():
    def __init__(self,A=[]):
        self.heap=[]
        self.dic=defaultdict(bool)
        self.size=0
        for a in A:self.add(a)
    
    def __str__(self):
        return str(self.heap)
    
    def add(self,x):
        if not self.find(x):
            heapq.heappush(self.heap,x)
            self.dic[x]=True
            self.size+=1

    def remove(self,x):
        if self.find(x):
            self.dic[x]=False
            self.size-=1

    def find(self,x):
        return self.dic[x]
    
    def top(self):
        while self.heap and self.dic[self.heap[0]]==False:
            heapq.heappop(self.heap)
        if self.heap:return self.heap[0]
        else:return None

    def pop(self):
        ret=None
        if self.heap:
            ret=self.top()
            self.remove(ret)
        return ret
class multiset():
    def __init__(self,A=[]):
        self.heap=[]
        self.dic=defaultdict(int)
        self.size=0
        for a in A:self.add(a)
    
    def __str__(self):
        return str(self.heap)
    
    def add(self,x):
        heapq.heappush(self.heap,x)
        self.dic[x]+=1
        self.size+=1

    def remove(self,x):
        if self.dic[x]>0:
            self.dic[x]-=1
            self.size-=1
    
    def count(self,x):
        return self.dic[x]

    def find(self,x):
        return self.dic[x]>0
    
    def top(self):
        while self.heap and self.dic[self.heap[0]]==0:
            heapq.heappop(self.heap)
        if self.heap:return self.heap[0]
        else:return None

    def pop(self):
        ret=None
        if self.heap:
            ret=self.top()
            self.remove(ret)
        return ret
class Edge():
    def __init__(self,x,y,val=1):
        self.x=x
        self.y=y
        self.val=val
class unionfind():
    def __init__(self,n):
        self.n=n
        self.P=[a for a in range(n)]
        self.rank=[0]*n
 
    def find(self,x):
        if(x!=self.P[x]):
            self.P[x]=self.find(self.P[x])
        return self.P[x]
 
    def same(self,x,y):
        return self.find(x)==self.find(y)
 
    def link(self,x,y):
        if self.rank[x]<self.rank[y]:
            self.P[x]=y
        elif self.rank[y]<self.rank[x]:
            self.P[y]=x
        else:
            self.P[x]=y
            self.rank[y]+=1
 
    def unite(self,x,y):
        self.link(self.find(x),self.find(y))
 
    def size(self):
        S=set()
        for a in range(self.n):
            S.add(self.find(a))
        return len(S)
def yn(b):print("yes" if b else "no")
def Yn(b):print("Yes" if b else "No")
def YN(b):print("YES" if b else "NO")
def ispow(a,b):
    now=b
    while now<a:
        now*=b
    return now==a
def getbin(num,size):
    A=[0]*size
    for a in range(size):
        if (num>>(size-a-1))&1==1:
            A[a]=1
        else:
            A[a]=0
    return A
def getfacs(n,mod_=0):
    A=[1]*(n+1)
    for a in range(2,len(A)):
        A[a]=A[a-1]*a
        if(mod_>0):A[a]%=mod_
    return A
def comb(n,r,mod,fac):
    if(n-r<0):return 0
    return (fac[n]*pow(fac[n-r],mod-2,mod)*pow(fac[r],mod-2,mod))%mod
def nextcomb(num,size):
    x=num&(-num)
    y=num+x
    z=num&(~y)
    z//=x
    z=z>>1
    num=(y|z)
    if(num>=(1<<size)):return False
    else:return num
def getprimes(n):
    if n==0:return []
    A=[True]*(n+1)
    A[0]=False
    A[1]=False
    for a in range(2,n+1):
        if A[a]:
            for b in range(a*2,n+1,a):
                A[b]=False
    ret=[]
    for a in range(n+1):
        if(A[a]):ret.append(a)
    return ret
def isprime(num):
    if(num<=1):return False
    i=2
    while i*i<=num:
       if(num%i==0):return False
       i+=1
    return True
def ifelse(b,t,f):return t if b else f
def factorize(n):
    b = 2
    ret=defaultdict(int)
    while b * b <= n:
        while n % b == 0:
            n //= b
            ret[b]+=1
        b+=1
    if n > 1:ret[n]+=1
    return ret
def inputint(row=1): 
    if row==1:
        ret=list(map(int,input().split()))
        if len(ret)==1:ret=ret[0]
    else:
        ret=[None]*row
        for a in range(row):
            ret[a]=int(input())
    return ret
def inputfloat(row=1): 
    if row==1:
        ret=list(map(float,input().split()))
        if len(ret)==1:ret=ret[0]
    else:
        ret=[None]*row
        for a in range(row):
            ret[a]=float(input())
    return ret
def istanchouzouka(A):
    f=True
    prev=min(A)-1
    for a in A:
        if prev>=a:
            f=False
        prev=a
    return f
def istanchouhigensyou(A):
    f=True
    prev=min(A)-1
    for a in A:
        if prev>a:
            f=False
        prev=a
    return f
def getallsum(A):
    s=sum(A)
    dp=defaultdict(int)
    dp[0]=1
    for a in range(0,len(A)):
        for b in range(s,-1,-1):
            if b-A[a]>=0:
                dp[b]+=dp[b-A[a]]
    return dp
def yuukoutomukou(edges):
    ret=deepcopy(edges)
    for edge in edges:
        if not edge.x==edge.y:
            ret.append(Edge(edge.y,edge.x,edge.val))
    return ret
def dijkstra(edges,V,start):
    mincost=[inf]*V
    G=[[] for a in range(V)]
    for edge in edges:
        G[edge.x].append([edge.val,edge.y])
    Q=PriorityQueue()
    Q.put([0,start])#[cost,x]
    while not Q.empty():
        nowcost,nowx=Q.get()
        if mincost[nowx]==inf:
            mincost[nowx]=nowcost
            for cost,y in G[nowx]:
                newcost=nowcost+cost
                Q.put([newcost,y])
    return mincost
def warshallfloyd(edges,V):
    mincost=[[inf for b in range(V)] for a in range(V)]
    for a in range(V):mincost[a][a]=0
    for edge in edges:
        mincost[edge.x][edge.y]=min(mincost[edge.x][edge.y],edge.val)#x→yが複数ある場合のためにmin()する
    for k in range(V):
        for s in range(V):
            for t in range(V):
                if mincost[s][k]==inf or mincost[k][t]==inf:continue
                mincost[s][t]=min(mincost[s][t],mincost[s][k]+mincost[k][t])
    return mincost
def bellemanford(edges,V,start):
    mincost=[inf]*V
    mincost[start]=0
    for _ in range(V):
        for edge in edges:
            if mincost[edge.x]==inf:continue
            mincost[edge.y]=min(mincost[edge.y],mincost[edge.x]+edge.val)
    return mincost
def getmd(x1,y1,x2,y2):return abs(x1-x2)+abs(y1-y2)
def geted(x1,y1,x2,y2):return math.sqrt((x1-x2)**2+(y1-y2)**2)
class fordfulkerson():
    def __init__(self,edges,V,s,t):
        self.V=V
        self.used=[False]*V
        self.G=[[] for a in range(V)]
        self.s=s
        self.t=t
        for edge in edges:
            self.G[edge.x].append({"x":edge.x,"y":edge.y,"cap":edge.val,"rev":len(self.G[edge.y])})
            self.G[edge.y].append({"x":edge.y,"y":edge.x,"cap":0,"rev":len(self.G[edge.x])-1})
    def dfs(self,v,t,f=inf):
        if v==t:return f
        self.used[v]=True
        for a in range(len(self.G[v])):
            x=self.G[v][a]["x"]
            y=self.G[v][a]["y"]
            cap=self.G[v][a]["cap"]
            rev=self.G[y][self.G[x][a]["rev"]]
            if self.used[y] or cap==0:continue
            f2=self.dfs(y,t,min(f,cap))
            if f2>0:
                self.G[v][a]["cap"]-=f2
                rev["cap"]+=f2
                return f2
        return 0
    def maxflow(self):
        flow=0
        while True:
            self.used=[False]*V
            zouka=self.dfs(self.s,self.t)
            if zouka==0:break
            flow+=zouka
        return flow
def zipsort(*args):
    ziplist=sorted(zip(*args))
    for a in range(len(args)):
        for b in range(len(ziplist)):
            args[a][b]=ziplist[b][a]
def zipreverse(*args):
    ziplist=list(zip(*args))
    rev=[]
    for a in range(len(ziplist)-1,-1,-1):
        rev.append(ziplist[a])
    for a in range(len(args)):
        for b in range(len(rev)):
            args[a][b]=rev[b][a]

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

Submission status: Accepted

Solution code:
s=input()
t=input()

n=len(s)

cnt=0
for i in range(n):
    if s[i]!=t[i]:
        cnt+=1

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
t = input()

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

print(ans)

Submission status: Accepted

Solution code:
import sys
import math
import heapq
sys.setrecursionlimit(10**7)
INTMAX = 9223372036854775807
INTMIN = -9223372036854775808
DVSR = 1000000007
def POW(x, y): return pow(x, y, DVSR)
def INV(x, m=DVSR): return pow(x, m - 2, m)
def DIV(x, y, m=DVSR): return (x * INV(y, m)) % m
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def FLIST(n):
    res = [1]
    for i in range(1, n+1): res.append(res[i-1]*i%DVSR)
    return res

S=input()
T=input()

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

print(res)