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:
from math import gcd

from math import factorial as f

from math import ceil,floor,sqrt
import math

import bisect
import re
import heapq


from copy import deepcopy
import itertools
from itertools import permutations

from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))


yes = "Yes"
no = "No"


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




main()

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:
# import string
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

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

Submission status: Accepted

Solution code:
import bisect
import sys
import math
from collections import deque
from heapq import heappush, heappop

def sRaw():
    return input().rstrip("\r")


def iRaw():
    return int(input())


def ssRaw():
    return input().split()


def isRaw():
    return list(map(int, ssRaw()))


INF = 1 << 29

#DIV = (10**9) + 7
DIV = 998244353

def mod_inv_prime(a, mod=DIV):
    return pow(a, mod-2, mod)


def mod_inv(a, b):
    r = a
    w = b
    u = 1
    v = 0
    while w != 0:
        t = r//w
        r -= t*w
        r, w = w, r
        u -= t*v
        u, v = v, u
    return (u % b+b) % b


def CONV_TBL(max, mod=DIV):
    fac, finv, inv = [0]*max, [0]*max, [0]*max
    fac[0] = fac[1] = 1
    finv[0] = finv[1] = 1
    inv[1] = 1
    for i in range(2, max):
        fac[i] = fac[i-1]*i % mod
        inv[i] = mod - inv[mod % i] * (mod//i) % mod
        finv[i] = finv[i-1]*inv[i] % mod

    class CONV:
        def __init__(self):
            self.fac = fac
            self.finv = finv
            pass

        def ncr(self, n, k):
            if(n < k):
                return 0
            if(n < 0 or k < 0):
                return 0
            return fac[n]*(finv[k]*finv[n-k] % DIV) % DIV

    return CONV()


def cumsum(As):
    s = 0
    for a in As:
        s += a
        yield s


sys.setrecursionlimit(200005)


def dijkstra(G,start=0):
    heap = []
    cost = [INF]*len(G)
    heappush(heap,(0,start))
    while len(heap)!=0:
        c,n = heappop(heap)
        if cost[n] !=INF:
            continue
        cost[n]=c
        for e in G[n]:
            ec,v = e
            if cost[v]!=INF:
                continue
            heappush(heap,(ec+c,v))
    return cost


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




main()

Submission status: Accepted

Solution code:
#create date: 2020-06-27 21:00

import sys
stdin = sys.stdin

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
from collections import deque
import heapq
import itertools
from decimal import Decimal
import bisect
from operator import itemgetter
MAX_INT = int(10e18)
MIN_INT = -MAX_INT
mod = 1000000000+7
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

s = list(S())
t = list(S())

ans = 0
for ss,tt in zip(s,t):
  if ss != tt:
    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:
s = input()
t = 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 = list(input())
T = list(input())

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

print(res)

Submission status: Accepted

Solution code:
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations, accumulate, product, combinations_with_replacement
import sys
import bisect
import string
import math
import time


def I(): return int(input())
def S(): return input()
def MI(): return map(int, input().split())
def MS(): return map(str, input().split())
def LI(): return [int(i) for i in input().split()]
def LI_(): return [int(i)-1 for i in input().split()]
def StoI(): return [ord(i)-97 for i in input()]
def ItoS(nn): return chr(nn+97)
def input(): return sys.stdin.readline().rstrip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def print_matrix(mat):
    for i in range(len(mat)):
        print(*['IINF' if v == IINF else "{:0=4}".format(v) for v in mat[i]])


yn = {False: 'No', True: 'Yes'}
YN = {False: 'NO', True: 'YES'}
MOD = 10**9+7
inf = float('inf')
IINF = 10**19
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
sys.setrecursionlimit(10**6)
nums = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']
show_flg = False
# show_flg = True


def main():
    s = S()
    t = S()
    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
from collections import defaultdict, deque, Counter
import math

# import copy
from bisect import bisect_left, bisect_right
# import heapq

# sys.setrecursionlimit(1000000)

# input aliases
input = sys.stdin.readline

getS = lambda: input().strip()
getN = lambda: int(input())
getList = lambda: list(map(int, input().split()))
getZList = lambda: [int(x) - 1 for x in input().split()]

INF = 10 ** 20
MOD = 10**9 + 7
divide = lambda x: pow(x, MOD-2, MOD)

def solve():
    # n = getN()
    s = getS()
    s2 = getS()
    ans = 0
    for i, j in zip(s, s2):
        if i != j:
            ans += 1
    print(ans)
    # print(n + n * n + n * n* n)
def main():
    n = getN()
    for _ in range(n):
        solve()


if __name__ == "__main__":
    # main()
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import itertools
from collections import deque,defaultdict,Counter
from itertools import accumulate
import bisect
from heapq import heappop,heappush,heapify
import math
from copy import deepcopy
import queue
#import numpy as np
# sympy as syp(素因数分解とか)
Mod = 1000000007
fact = [1, 1]
factinv = [1, 1]
inv = [0, 1] 
for i in range(2, 10**5 + 1):
    fact.append((fact[-1] * i) % Mod)
    inv.append((-inv[Mod % i] * (Mod // i)) % Mod)
    factinv.append((factinv[-1] * inv[-1]) % Mod)
    
def cmb(n, r, p):
    if (r < 0) or (n < r):
        return 0
    r = min(r, n - r)
    return fact[n] * factinv[r] * factinv[n - r] % p
    
def sieve_of_eratosthenes(n):
    if not isinstance(n,int):
        raise TypeError("n is not int")
    if n<2:
        raise ValueError("n is not effective")
    prime = [1]*(n+1)
    for i in range(2,int(math.sqrt(n))+1):
        if prime[i] == 1:
            for j in range(2*i,n+1):
                if j%i == 0:
                    prime[j] = 0
    res = []
    for i in range(2,n+1):
        if prime[i] == 1:
            res.append(i)
    return res

 
class UnionFind:
    def __init__(self,n):
        self.parent = [i for i in range(n+1)]
        self.rank = [0 for i in range(n+1)]
    
    def findroot(self,x):
        if x == self.parent[x]:
            return x
        else:
            y = self.parent[x]
            y = self.findroot(self.parent[x])
            return y
    
    def union(self,x,y):
        px = self.findroot(x)
        py = self.findroot(y)
        if px < py:
            self.parent[y] = px
        else:
            self.parent[px] = py
 
    def same_group_or_no(self,x,y):
        return self.findroot(x) == self.findroot(y)
import string
def main():  #startline-------------------------------------------
    s = input()
    t = input()
    n = len(s)
    ans = 0
    for i in range(n):
        if s[i] != t[i]:
            ans += 1
    print(ans)
if __name__ == "__main__":
    main() #endline===============================================

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**9)

def mi(): return map(int,input().split())
def ii(): return int(input())
def isp(): return input().split()
def deb(text): print("-------\n{}\n-------".format(text))

def main():
    S = list(input())
    T = list(input())

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





if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7) #再帰関数の上限,10**5以上の場合python
import math
from copy import copy, deepcopy
from copy import deepcopy as dcp
from operator import itemgetter
from bisect import bisect_left, bisect, bisect_right#2分探索
#bisect_left(l,x), bisect(l,x)#aはソート済みである必要あり。aの中からx未満の要素数を返す。rightだと以下
from collections import deque
#deque(l), pop(), append(x), popleft(), appendleft(x)
#q.rotate(n)で → にn回ローテート
from collections import Counter#文字列を個数カウント辞書に、
#S=Counter(l),S.most_common(x),S.keys(),S.values(),S.items()
from itertools import accumulate,combinations,permutations#累積和
#list(accumulate(l))
from heapq import heapify,heappop,heappush
#heapify(q),heappush(q,a),heappop(q) #q=heapify(q)としないこと、返り値はNone
#import fractions#古いatcoderコンテストの場合GCDなどはここからimportする
from functools import lru_cache#pypyでもうごく
#@lru_cache(maxsize = None)#maxsizeは保存するデータ数の最大値、2**nが最も高効率
from decimal import Decimal

def input(): 
    x=sys.stdin.readline()
    return x[:-1] if x[-1]=="\n" else x
def printl(li): _=print(*li, sep="\n") if li else None
def argsort(s, return_sorted=False): 
    inds=sorted(range(len(s)), key=lambda k: s[k])
    if return_sorted: return inds, [s[i] for i in inds]
    return inds
def alp2num(c,cap=False): return ord(c)-97 if not cap else ord(c)-65
def num2alp(i,cap=False): return chr(i+97) if not cap else chr(i+65)
def matmat(A,B):
    K,N,M=len(B),len(A),len(B[0])
    return [[sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] for i in range(N)]
def matvec(M,v):
    N,size=len(v),len(M)
    return [sum([M[i][j]*v[j] for j in range(N)]) for i in range(size)]
def T(M):
    n,m=len(M),len(M[0])
    return [[M[j][i] for j in range(n)] for i in range(m)]
def main():
    mod = 1000000007
    #w.sort(key=itemgetter(1),reversed=True)  #二個目の要素で降順並び替え

    #N = int(input())
    #N, K = map(int, input().split())
    #A = tuple(map(int, input().split())) #1行ベクトル
    #L = tuple(int(input()) for i in range(N)) #改行ベクトル
    #S = tuple(tuple(map(int, input().split())) for i in range(N)) #改行行列

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

    print(cnt)

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution 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:
print(sum(si != ti for si, ti in zip(input(), input())))

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()
n = len(s)
ans = 0
for i in range(n):
    if s[i] != t[i]:
        ans+= 1
        
print(ans)

Submission status: Accepted

Solution code:
# coding: utf-8
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
input = sys.stdin.readline

S = input().rstrip()
T = input().rstrip()

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline


def readstr():
    return input().strip()


def readint():
    return int(input())


def readnums():
    return map(int, input().split())


def readstrs():
    return input().split()


def main():
    S = readstr()
    T = readstr()
    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
input = lambda: sys.stdin.readline().rstrip("\r\n")

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:


import sys
import math
import itertools
import collections

def solve(S,T):
    counter = 0
    for s,t in zip(S,T):
        if s != t:
            counter += 1
    return counter
def main():
    S = input()
    T = input()
    # solve()
    print(solve(S,T))

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# B

import sys
from collections import defaultdict, deque
from heapq import heappush, heappop
import math
import bisect
input = sys.stdin.readline

# 再起回数上限変更
# sys.setrecursionlimit(1000000)

s = input()
t = input()

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
readline = sys.stdin.readline

def solve():
    S = readline().rstrip()
    T = readline().rstrip()

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

solve()

Submission status: Accepted

Solution code:
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    s = input()
    t = input()
    ans = 0

    for ch1, ch2 in zip(s, t):
        if ch1 != ch2:
            ans += 1

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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:
import sys

def solve():
      input = sys.stdin.readline
      S = input().strip("\n")
      T = input().strip("\n")
      a = 0
      for i in range(len(S)):
            if S[i] != T[i]: a += 1
      print(a)

      return 0

if __name__ == "__main__":
      solve()

Submission status: Accepted

Solution code:
s = input() #sys.stdin.readlineは最後が改行
t = input() #sys.stdin.readlineは最後が改行
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()
res=0
for i in range(len(S)):
    res+=(S[i]!=T[i])

print(res)

Submission status: Accepted

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

ret = 0
for i, ch in enumerate(s):
    if t[i] != ch:
        ret += 1

print(ret)

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())
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()
count = 0
for c1, c2 in zip(s, t):
    if c1 != c2:
        count += 1

print(count)

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:
S = input()
T = input()
ans = 0
for s, t in zip(S, T):
    ans += (s!=t)
print(ans)

Submission status: Accepted

Solution code:
from sys import stdin
from sys import setrecursionlimit
setrecursionlimit(10 ** 7)

s = input()
t = input()
point = 0

for i,j in zip(s,t):
    if i != j:
        point += 1

print(point)

Submission status: Accepted

Solution code:
# import sys
# input = sys.stdin.readline

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

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:
# @author 

import sys

class BMinorChange:
    def solve(self, tc=0):
        s = input()
        t = input()
        ans = 0
        for i in range(len(s)):
            if s[i] != t[i]:
                ans += 1

        print(ans)


solver = BMinorChange()
input = sys.stdin.readline

solver.solve()

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

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 =list(input())
T =list(input())
count =0
for i,j in zip(S,T):
    if(i!=j):
        count +=1
print(count)

Submission status: Accepted

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

print(res)

Submission status: Accepted

Solution code:
S = input()
T = 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 = input()
t = input()
ans = 0
for i in range(len(s)):
    if s[i] == t[i]:
        pass
    else:
        ans += 1
print(ans)

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:
def main():
    #map(int,input().split())
    #list(map(int,input().split()))
    #a=int(input())
    S=input()
    T=input()
    ans=0
    for i in range(len(T)):
        if S[i]!=T[i]:
            ans+=1
    print(ans)

main()

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()

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:
from sys import stdin
nii=lambda:map(int,stdin.readline().split())
lnii=lambda:list(map(int,stdin.readline().split()))

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:
# coding: utf-8


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

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


print(main())

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 7)

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

S = list(input())
T = list(input())
L = len(S)

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

print(ans)

Submission status: Accepted

Solution code:
#import numpy as np
import sys, math
from itertools import permutations, combinations
from collections import defaultdict, Counter, deque
from math import factorial#, gcd
from bisect import bisect_left #bisect_left(list, value)
sys.setrecursionlimit(10**7)
enu = enumerate
MOD = 10**9+7
def input(): return sys.stdin.readline()[:-1]
pl = lambda x: print(*x, sep='\n')

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:
import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log,gcd
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
inf = float('inf')
ninf = -float('inf')

#Pythonを用いる場合
#numpy 1.18.0, scipy 1.4.1, scikit-learn 0.22, numba 0.47.0, networkx 2.4
 
import numpy as np
from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson
from scipy.sparse import csr_matrix

 
#整数input
def ii(): return int(sys.stdin.readline().rstrip()) #int(input())
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) #list(map(int,input().split()))
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]
#文字列input
def ss(): return sys.stdin.readline().rstrip() #input()
def mss(): return sys.stdin.readline().rstrip().split()
def limss(): return list(mss()) #list(input().split())
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]

#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？

s=list(ss())
t=list(ss())
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()
print(sum(1 for x, y in zip(s, t) if x != y))

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:
import sys
from collections import deque,Counter
import numpy as np
import math
sys.setrecursionlimit(10**6)
def S(): return sys.stdin.readline().rstrip()
def SL(): return map(str,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def IL(): return map(int,sys.stdin.readline().rstrip().split())

def Main():
    s = S()
    t = S()
    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()

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

Submission status: Accepted

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


main()

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]:
        continue
    ans+=1

print(ans)

Submission status: Accepted

Solution code:
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
	return list(map(int,input().split()))
def m(): #複数文字
	return map(int,input().split())
def onem(): #Nとかの取得
	return int(input())
def s(x): #圧縮
	a = []
	if len(x) == 0:
		return []
	aa = x[0]
	su = 1
	for i in range(len(x)-1):
		if aa != x[i+1]:
			a.append([aa,su])
			aa = x[i+1]
			su = 1
		else:
			su += 1
	a.append([aa,su])
	return a
def jo(x): #listをスペースごとに分ける
	return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
	return max(map(max,x))
def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

def pow_k(x, n):
    ans = 1
    while n:
        if n % 2:
            ans *= x
        x *= x
        n >>= 1
    return ans

"""
def nibu(x,n,r):
	ll = 0
	rr = r
	while True:
		mid = (ll+rr)//2

	if rr == mid:
		return ll
	if (ここに評価入れる):
		rr = mid
	else:
		ll = mid+1
"""

s = input()[:-1]
t = input()[:-1]

co = len(s)

for i in range(len(s)):
	if s[i] == t[i]:
		co -= 1
print(co)

Submission status: Accepted

Solution code:
import sys
import heapq
import re
from itertools import permutations
from bisect import bisect_left, bisect_right
from collections import Counter, deque
from math import factorial, sqrt, ceil, gcd
from functools import lru_cache, reduce
from decimal import Decimal
INF = 1 << 60
MOD = 1000000007
sys.setrecursionlimit(10 ** 7)

# UnionFind
class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())

# ダイクストラ
def dijkstra_heap(s, edge, n):
    #始点sから各頂点への最短距離
    d = [10**20] * n
    used = [True] * n #True:未確定
    d[s] = 0
    used[s] = False
    edgelist = []
    for a,b in edge[s]:
        heapq.heappush(edgelist,a*(10**6)+b)
    while len(edgelist):
        minedge = heapq.heappop(edgelist)
        #まだ使われてない頂点の中から最小の距離のものを探す
        if not used[minedge%(10**6)]:
            continue
        v = minedge%(10**6)
        d[v] = minedge//(10**6)
        used[v] = False
        for e in edge[v]:
            if used[e[1]]:
                heapq.heappush(edgelist,(e[0]+d[v])*(10**6)+e[1])
    return d

# 素因数分解
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

# 2数の最小公倍数
def lcm(x, y):
    return (x * y) // gcd(x, y)

# リストの要素の最小公倍数
def lcm_list(numbers):
    return reduce(lcm, numbers, 1)

# リストの要素の最大公約数
def gcd_list(numbers):
    return reduce(gcd, numbers)

# 素数判定
def is_prime(n):
    if n <= 1:
        return False
    p = 2
    while True:
        if p ** 2 > n:
            break
        if n % p == 0:
            return False
        p += 1
    return True


# limit以下の素数を列挙
def eratosthenes(limit):
    A = [i for i in range(2, limit+1)]
    P = []

    while True:
        prime = min(A)
        
        if prime > sqrt(limit):
            break
            
        P.append(prime)
            
        i = 0
        while i < len(A):
            if A[i] % prime == 0:
                A.pop(i)
                continue
            i += 1
            
    for a in A:
        P.append(a)
            
    return P

# 同じものを含む順列
def permutation_with_duplicates(L):

    if L == []:
        return [[]]

    else:
        ret = []

        # set（集合）型で重複を削除、ソート
        S = sorted(set(L))

        for i in S:

            data = L[:]
            data.remove(i)

            for j in permutation_with_duplicates(data):
                ret.append([i] + j)

        return ret


# ここから書き始める
s = input()
t = 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 = 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()

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

Submission status: Accepted

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

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

print(cnt)

Submission status: Accepted

Solution code:
import sys
readline = sys.stdin.readline

def main():
    S = readline().rstrip()
    T = readline().rstrip()
    res = 0
    for s, t in zip(S, T):
        if s != t:
            res += 1
    
    print(res)

if __name__ == '__main__':
    main()