qyliang/CodeNanoFix huggingface dataset:
Buggy code:
N = int(input())
t0, a0 = 1, 1
for _ in range(N):
    t, a = map(int, input().split())
    n = max((t0- 1)/ t+ 1, (a0-1)//a+1)
    t0, a0 = n*t, n*a

print(t0 + a0)

Fixed code:
N = int(input())

t0, a0 = 1, 1
for _ in range(N):
  t, a = map(int,input().split())
  vote = max((t0+t-1)//t, (a0+a-1)//a)
  t0 = t * vote
  a0 = a * vote
print(t0+a0)
Buggy code:
from math import ceil

N = int(input())
ta, ao = 1, 1
for i in range(N):
    T, A = map(int, input().split())
    if ta <= T and ao <= A:
        ta = T
        ao = A
    else:
        if ta % T == 0:
            n = ta//T
        else:
            n == ta//T + 1
        if ao % A == 0:
            m = ao//A
        else:
            m = ao//A + 1
        
        ta = max(n, m) * T
        ao = max(n, m) * A
        print(n)
print(ta+ao)

Fixed code:
from math import ceil

N = int(input())
ta, ao = 1, 1
for i in range(N):
    T, A = map(int, input().split())
    if ta <= T and ao <= A:
        ta = T
        ao = A
    else:
        if ta % T == 0:
            n = ta//T
        else:
            n = ta//T + 1
        if ao % A == 0:
            m = ao//A
        else:
            m = ao//A + 1
        
        ta = max(n, m) * T
        ao = max(n, m) * A
print(ta+ao)
Buggy code:
N = int(input())
T, A = 1, 1
for i in range(N):
    t, a = map(int, input().split())
    if T % t == 0:
        n1 = T // t
    else:
        n1 = T // t + 1
    if A % a == 0:
        n2 = A // a
    else:
        n2 = T // a + 1
    n = max(n1, n2)
    #print(T,A)
    T = n*t
    A = n*a
    
print(sum(T+A))

Fixed code:
N = int(input())
T, A = 1, 1
for i in range(N):
    t, a = map(int, input().split())
    if T % t == 0:
        n1 = T // t
    else:
        n1 = T // t + 1
    if A % a == 0:
        n2 = A // a
    else:
        n2 = A // a + 1
    #print('--',n1, n2)
    n = max(n1, n2)
    T = n*t
    A = n*a
    #print('--------',T, A)
    
print(T+A)
Buggy code:
import math
from Decimal import *

def main():
    N = int(input())
    T = []
    A = []
    for _ in range(N):
        t, a = map(int, input().split())
        T.append(t)
        A.append(a)

    for i in range(N - 1):
        if T[i] / T[i + 1] > 1 or A[i] / A[i + 1] > 1:
            mul = Decimal(max(math.ceil(T[i] / T[i + 1]), math.ceil(A[i] / A[i + 1])))
            A[i + 1] *= mul
            T[i + 1] *= mul
    print(T[N - 1] + A[N - 1])


if __name__ == "__main__":
    main()

Fixed code:
import math
from decimal import *

def main():
    N = int(input())
    T = []
    A = []
    for _ in range(N):
        t, a = map(int, input().split())
        T.append(t)
        A.append(a)

    for i in range(N - 1):
        if T[i] / T[i + 1] > 1 or A[i] / A[i + 1] > 1:
            mul = Decimal(max(math.ceil(T[i] / T[i + 1]), math.ceil(A[i] / A[i + 1])))
            A[i + 1] *= mul
            T[i + 1] *= mul
    print(T[N - 1] + A[N - 1])


if __name__ == "__main__":
    main()
Buggy code:
def ceil(x, y):
    if x % y == 0:
        return x // y
    else:
        return x // y + 1

n = int(input())
t = a = 1
for i in range(n):
    T, A = map(int, input().split())
    n = max(ceil(t / T), ceil(a / A))
    t = n * T
    a = n * A
print(t + a)

Fixed code:
def ceil(x, y):
    if x % y == 0:
        return x // y
    else:
        return x // y + 1

n = int(input())
t = a = 1
for i in range(n):
    T, A = map(int, input().split())
    n = max(ceil(t, T), ceil(a, A))
    t = n * T
    a = n * A
print(t + a)
Buggy code:
def ceil(x,y):
    if x%y == 0:
        return x//y
    if x%y == 1:
        return x//y + 1

n = int(input())
x,y = 1,1

for _ in range(n):
    t,a  = map(int,input().split())
    temp = max(ceil(x,t),ceil(y,a))
    x = t*temp
    y = a*temp

print(x+y)

Fixed code:
def ceil(x,y):
    if x%y == 0:
        return x//y
    else:
        return x//y + 1

n = int(input())
x,y = 1,1

for _ in range(n):
    t,a  = map(int,input().split())
    temp = max(ceil(x,t),ceil(y,a))
    x = t*temp
    y = a*temp

print(x+y)
Buggy code:
n=int(input())
ta=[list(map(int, input().split())) for _ in range(n)]
a,b=1,1
import math
for i in range(n):
    x,y=ta[i]
    t=max(-(-a//x),-(b//y))
    a,b=t*x,t*y
print(a+b)

Fixed code:
n=int(input())
ta=[list(map(int, input().split())) for _ in range(n)]
a,b=1,1
import math
for i in range(n):
    x,y=ta[i]
    t=max(-(-a//x),-(-b//y))
    a,b=t*x,t*y
print(a+b)
Buggy code:
N=int(input())
T=[]
A=[]
for i in range(N):
    Ti,Ai=[int(i) for i in input().split()]
    T.append(Ti)
    A.append(Ai)
T_ans=1
A_ans=1
for i in range(N):
    if T_ans>T[i] or A_ans>A[i]:
        T_ans=T[i]*max(-(-T_ans//T[i]),-(-A_ans//A[i]))
        A_ans=A[i]*T_ans/T[i]
    else:
        T_ans=T[i]
        A_ans=A[i]
print(T_ans+A_ans)

Fixed code:
N=int(input())
T=[]
A=[]
for i in range(N):
    Ti,Ai=[int(i) for i in input().split()]
    T.append(Ti)
    A.append(Ai)
T_ans=1
A_ans=1
k=1
for i in range(N):
    if T_ans>T[i] or A_ans>A[i]:
        k=max(-(-T_ans//T[i]),-(-A_ans//A[i]))
        T_ans=T[i]*k
        A_ans=A[i]*k
    else:
        T_ans=T[i]
        A_ans=A[i]
print(T_ans+A_ans)
Buggy code:
# -*- coding: utf-8 -*-
"""
Created on Sat Aug 11 14:44:47 2018
ABC046C
@author: maezawa
"""
import math
n = int(input())
tp = 1
ap = 1
for i in range(n):
    t, a = list(map(int, input().split()))
    if ti == t and ai == a:
        continue
    ti = t
    ai = a
    nit = tp/ti
    nia = ap/ai
    ni = math.ceil(max(nit, nia))
    vi = ni*(ti+ai)
    #print(ni, vi)
    tp = ni*ti
    ap = ni*ai

print(vi)

Fixed code:
# -*- coding: utf-8 -*-
"""
Created on Sat Aug 11 14:44:47 2018
ABC046C
@author: maezawa
"""
import math
n = int(input())
tp = 1
ap = 1
for i in range(n):
    ti, ai = list(map(int, input().split()))
    #nit = math.ceil(tp/ti)
    #nia = math.ceil(ap/ai)
    nit = -tp//ti
    nia = -ap//ai
    ni = max(-nit, -nia)
    vi = ni*(ti+ai)
    #print(ni, vi)
    tp = ni*ti
    ap = ni*ai

print(vi)
Buggy code:
n = int(input())
x, y = [int(i) for i in input().split()]
print(y)
for i in range(n - 1):
    t, a = [int(i) for i in input().split()]
    c = max(-(-x//t), -(-y//a))
    x = t * c
    y = a * c
print(x + y)


Fixed code:
n = int(input())
x, y = [int(i) for i in input().split()]

for i in range(n-1):
  t, a = [int(i) for i in input().split()]
 
  c = max(-(-x//t), -(-y//a))

  x = t * c
  y = a * c
    
print(x+y)
Buggy code:
N = int(input())
a, b = 1, 1
for i in range(N):
    x, y = map(int, input().split())
    c = max(-(-a // x), -(-b // y))
    a, b = c* x, c* y
    print(a + b)

Fixed code:
N=int(input())
x,y=1,1
for i in range(N):
    a,b=map(int,input().split())
    s=max((x-1)//a+1,(y-1)//b+1)
    x=s*a
    y=s*b
print(x+y)
Buggy code:
import sys
import math
n = map(int,input())
T,A = 1,1
for i in range(n):
    t,a = map(int,input().split())
    coef = max((T+t-1)//t,(A+a-1)//a)
    T,A = coef * t, coef * a 
print(T+A)     

    


Fixed code:
import sys
import math
n = int(input())
T,A = 1,1
for i in range(n):
    t,a = map(int,input().split(" "))
    coef = max((T+t-1)//t,(A+a-1)//a)
    T,A = coef * t, coef * a 
print(T+A)
Buggy code:
N = int(input())
T = []
A = []
Nb = 0
for i in range(N):
    a, b = map(int,input().split())
    T.append(a)
    A.append(b)
Tn = 1
An = 1
for i in range(N):
        tmp = max(math.ceil(Tn / T[i]), math.ceil(An / A[i]))
        Tn = T[i] * tmp
        An = A[i] * tmp
print(Tn + An)

Fixed code:
N = int(input())
T = []
A = []
Nb = 0
for i in range(N):
    a, b = map(int,input().split())
    T.append(a)
    A.append(b)
Tn = 1
An = 1
for i in range(N):
        tmp = max((Tn+T[i]-1) // T[i], (An+A[i]-1) // A[i])
        Tn = T[i] * tmp
        An = A[i] * tmp
print(Tn + An)
Buggy code:
import math

n = int(input())
ta = [[int(i) for i in input().split()] for j in range(n)]

a = 1
b = 1
for i in range(n):
    n = max(math.floor(a/ta[i][0]), math.floor(b/ta[i][1]))
    
    a = n * ta[i][0]
    b = n * ta[i][1]

print(a+b)

Fixed code:
import math

n = int(input())
ta = [[int(i) for i in input().split()] for j in range(n)]

a = 1
b = 1
for i in range(n):
    #n = max(math.floor(a/ta[i][0]), math.floor(b/ta[i][1]))
    n = max(~-a//ta[i][0] + 1, ~-b//ta[i][1] + 1)
    a = n * ta[i][0]
    b = n * ta[i][1]

print(a+b)
Buggy code:
from fractions import Fraction


def main():
    N = int(input())
    t, a = 1, 1
    for _ in range(N):
        _t, _a = map(int, input().split())
        n = max(Fraction(t / _t), Fraction(a / _a))
        t, a = _t * n, _a * n
    print(t + a)

if __name__ == '__main__':
    main()


Fixed code:
from math import ceil
from fractions import Fraction


def main():
    N = int(input())
    t, a = 1, 1
    for _ in range(N):
        _t, _a = map(int, input().split())
        n = ceil(max(Fraction(t, _t), Fraction(a, _a)))
        t, a = _t * n, _a * n
    print(t + a)

if __name__ == '__main__':
    main()
Buggy code:
import math
n = int(input())
i = 0
list = []
while i < n:
   list.append(input().split())
   i += 1
h = 0
th = 1
ah = 1
while h < n:
     listh = list[h]
     x = int(listh[0])
     y = int(listh[1])
     m = max(math.ceil(th/x),math.ceil(ah/x))
     th = m*x
     ah = m*y
     h += 1
print(th+ah)

Fixed code:
import math
from decimal import Decimal
n = int(input())
i = 0
list = []
while i < n:
   list.append(input().split())
   i += 1
h = 0
th = 1
ah = 1
while h < n:
     listh = list[h]
     x = int(listh[0])
     y = int(listh[1])
     m = max(math.ceil(th/x),math.ceil(ah/y))
     th = Decimal(m*x)
     ah = Decimal(m*y)
     h += 1
print(th+ah)
Buggy code:
# coding: utf-8
import math

N = int(input())

votes = []

for _ in range(N):
    votes.append([float(n) for n in input().split()])

befa = 1
befb = 1

for a, b in votes:
    kakeru = max(math.ceil(befa / a), math.ceil(befb / b))
    befa = a * kakeru
    befb = b * kakeru
    #print(befa,befb)

print((befa+befb))

Fixed code:
# coding: utf-8
import math
from decimal import Decimal

N = int(input())

votes = []

for _ in range(N):
    votes.append([Decimal(n) for n in input().split()])

befa = 1
befb = 1

for a, b in votes:
    kakeru = Decimal(max(math.ceil(befa / a), math.ceil(befb / b)))
    befa = a * kakeru
    befb = b * kakeru

print(int(befa)+int(befb))
Buggy code:
ans = 0
 
for i in range(int(input())):
    t_i, a_i = list(map(lambda x: int(x), input().split()))
 
    if i == 0:
        t, a = t_i, a_i
 
    else:
        n = max((t + t_i - 1) // t_i, (a + a_i - 1) // a_i)
        t = n*t_i
        a = n*a_i
 
    ans = t + a

Fixed code:

ans = 0

for i in range(int(input())):
    t_i, a_i = list(map(lambda x: int(x), input().split()))

    if i == 0:
        t, a = t_i, a_i

    else:
        n = max((t + t_i - 1) // t_i, (a + a_i - 1) // a_i)
        t = n*t_i
        a = n*a_i

    ans = t + a

print(ans)
Buggy code:
import math
from decimal import Decimal

N = int(input())
T, A = [int(x) for x in input().split()]

for i in range(1,N):
        T2, A2 = [int(x) for x in input().split()]
        print('i= ',i)
        n = max(math.ceil(Decimal(T)/Decimal(T2)),math.ceil(Decimal(A)/Decimal(A2))
        print('n= ',n)
        T = T2*n
        A = A2*n
        print('T= ',T)
        print('A= ',A)

print(T + A)

Fixed code:
import math
from decimal import Decimal

N = int(input())
T, A = [Decimal(x) for x in input().split()]

for i in range(1,N):
        T2, A2 = [Decimal(x) for x in input().split()]
        n = Decimal(max(math.ceil(T/T2),math.ceil(A/A2)))
        T = T2 * n
        A = A2 * n

print(T+A)
Buggy code:
def getLnInput():
    return input().split()


def getNewVote(currentVote, newRatio):
    multFacCeil = []
    for i in range(2):
        multFacCeil.append((currentVote[i] - 1) // newRatio[i] + 1)
    newVote = []
    maxMF = max(multFacCeil)
    for i in range(2):
        newVote.append(newRatio[i] * maxMF)
    return newVote


def main():
    N = int(getLnInput()[0])
    voteNum = list(map(int, getLnInput()))
    for i in range(N - 1):
        print(voteNum)
        newRatio = list(map(int, getLnInput()))
        voteNum = getNewVote(voteNum, newRatio)
    print(sum(voteNum))
    return


main()


Fixed code:
def getLnInput():
    return input().split()


def getNewVote(currentVote, newRatio):
    multFacCeil = []
    for i in range(2):
        multFacCeil.append((currentVote[i] - 1) // newRatio[i] + 1)
    newVote = []
    maxMF = max(multFacCeil)
    for i in range(2):
        newVote.append(newRatio[i] * maxMF)
    return newVote


def main():
    N = int(getLnInput()[0])
    voteNum = list(map(int, getLnInput()))
    for i in range(N - 1):
        newRatio = list(map(int, getLnInput()))
        voteNum = getNewVote(voteNum, newRatio)
    print(sum(voteNum))
    return


main()
Buggy code:
S = input()
T = 'CODEFESTIVAL2016'
ans = 0
for _ in range(16):
  ans += S[i] != T[i]
print(ans)
  

Fixed code:
S = input()
T = 'CODEFESTIVAL2016'
ans = 0
for i in range(16):
  ans += S[i] != T[i]
print(ans)
Buggy code:
s = input()
t = "CODEFESTIVAL2016"
cnt = 0
for i, z in zip(s, t):
    if s != z:
        cnt += 1
        
print(cnt)

Fixed code:
s = input()
t = "CODEFESTIVAL2016"
cnt = 0
for i, z in zip(s, t):
    if i != z:
        cnt += 1
        
print(cnt)
Buggy code:
s = input()
sum(a!=b for a, b in zip(s, 'CODEFESTIVAL2016'))

Fixed code:
s = input()
print(sum(a!=b for a, b in zip(s, 'CODEFESTIVAL2016')))
Buggy code:
s="CODEFESTIVAL2016"
t=input()
ans=0
for c1,c2 in zip(s,t):
  if c1!=c2 : ns+=1
print(ans)

Fixed code:
s="CODEFESTIVAL2016"
t=input()
ans=0
for c1,c2 in zip(s,t):
  if c1!=c2 : ans+=1
print(ans)
Buggy code:
S=list(str(input().split()))
G='CODEFESTIVAL2016'
t=0
for i in range(16):
  if S[i]!=G[i]:
    t+=1
print(t)

Fixed code:
S=list(str(input()))
G='CODEFESTIVAL2016'
t=0
for i in range(16):
  if S[i]!=G[i]:
    t+=1
print(t)
Buggy code:
a = 'CODEFESTIVAL2016'
b = input()
lista = list(a)
listb = list(b)
count = 0
for i in range(len(lista)):
  if lista[i]!=listb[i]:
    count++
print(count)

Fixed code:
a = 'CODEFESTIVAL2016'
b = input()
lista = list(a)
listb = list(b)
count = 0
for i in range(len(lista)):
  if lista[i]!=listb[i]:
    count+=1
print(count)
Buggy code:
S = "CODEFESTIVAL2016"
s = input()
result = 0
for i in range(16):
  if S[i] == s[i]:
    result += 1
print(result)

Fixed code:
S = "CODEFESTIVAL2016"
s = input()
result = 0
for i in range(16):
  if S[i] != s[i]:
    result += 1
print(result)
Buggy code:
S = input()
K = "CODEFESTIVAL2016"
sum = 0
for i in range(len(S)):
  if S[i] != K[i]
  sum += 1
print(sum)

Fixed code:
S = input()
K = "CODEFESTIVAL2016"
sum = 0
for i in range(len(S)):
  if S[i] != K[i]:
    sum += 1
print(sum)
Buggy code:
#list(map(int, input().split()))
s=input()
t='CODEFESTIVAL2016'
ans=0
for i in range(16):
    if t[i]==s[i]:ans+=1
print(ans)

Fixed code:
#list(map(int, input().split()))
s=input()
t='CODEFESTIVAL2016'
ans=0
for i in range(16):
    if t[i]!=s[i]:ans+=1
print(ans)
Buggy code:
S = list(input())

C = list(CODEFESTIVAL2016)

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

Fixed code:
S = list(input())

C = list("CODEFESTIVAL2016")

cnt = 0
for i in range(len(C)):
    if S[i] != C[i]:
        cnt += 1
print(cnt)
Buggy code:
        s=list(input())
        v=list("CODEFESTIVAL2016")
        cnt=0
        for i in range(16):
            if s[i]!=v[i]:
                cnt+=1
        print(cnt)

Fixed code:
s=list(input())
t=list("CODEFESTIVAL2016")
cnt=0
for i in range(16):
    if(s[i]!=t[i]):
        cnt+=1
print(cnt)
Buggy code:
s=list(input())
a=list('CODEFESTIVAL2016')
ans=0
for i in range(len(s)):
  if s[i]==a[i]:
    ans+=1
print(ans)

Fixed code:
a="CODEFESTIVAL2016"
s=input()
ans=0
for i in range(len(s)):
    if a[i]!=s[i]:
        ans+=1
print(ans)
Buggy code:
S=input()
print(sum(s=="CODEFESTIVAL2016"[i] for i,s in enumerate(S)))

Fixed code:
S=input()
print(sum(s!="CODEFESTIVAL2016"[i] for i,s in enumerate(S)))
Buggy code:
S = input()
T = "CODEFESTIVAL2016"
c = 0
for i in range(16):
  if S[i]==T[i]:
    c += 1
print(c)

Fixed code:
S = input()
T = "CODEFESTIVAL2016"
c = 0
for i in range(16):
  if S[i]!=T[i]:
    c += 1
print(c)
Buggy code:
S = input()
s = "CODEFESTIVAL2016"
c = 0
for i in range (15):
  if S[i]!= s[i]:
    c += 1
    
print(c)

Fixed code:
S = input()
s = "CODEFESTIVAL2016"
c = 0
for i in range (16):
  if S[i]!= s[i]:
    c += 1
    
print(c)
Buggy code:
S1=input()
S2='CODEFESTIVAL2016'

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

print(ans)

Fixed code:
S1=input()
S2='CODEFESTIVAL2016'

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

print(ans)
Buggy code:
S = input()
A = 'CODEFESTIVAL2016'
ans = 0
for i in range(len(S)):
  if S[i] == A[i]:
    ans += 1

print(ans)


Fixed code:
S = input()
A = 'CODEFESTIVAL2016'
ans = 0
for i in range(len(S)):
  if S[i] != A[i]:
    ans += 1

print(ans)
Buggy code:
s=input();print(sum("CODEFESTIVAL2016"[i]==s[i] for i in range(16)))

Fixed code:
s=input();print(sum("CODEFESTIVAL2016"[i]!=s[i] for i in range(16)))
Buggy code:
s= input()
ss ="CODEFESTIVAL2016"
t = 1
for i in range(ss):
  if s[i]!=ss[i]:
    t +=1
print(t)

Fixed code:
s= input()
ss ="CODEFESTIVAL2016"
t = 0
for i in range(len(ss)):
  if s[i]!=ss[i]:
    t +=1
print(t)
Buggy code:
s = input()
S = "CODEFESTIVAL2016"
count = 0
for i in range(15):
    if s[i] != S[i]:
        count+=1
print(count)

Fixed code:
s = input()
S = "CODEFESTIVAL2016"
count = 0
for i in range(16):
    if s[i] != S[i]:
        count+=1
print(count)
Buggy code:
a=input()
b='CODEFESTIVAL2016'
ans=0
for i in range(16):
  ans+=(a[i]==b[i])
print(ans)

Fixed code:
a=input()
b='CODEFESTIVAL2016'
ans=0
for i in range(16):
  ans+=(a[i]!=b[i])
print(ans)
Buggy code:
s = sorted(list(input()))
t = 'CODEFESTIVAL2016'
cnt = 0
for i in range(len(s)):
    if s[i] != t[i]:
        cnt += 1

print(cnt)

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

print(cnt)
Buggy code:
S = input()
correct = "CODEFESTIVAL2016"
cnt = 0
for i in range(len(S)):
    if S[i] == correct[i]:
        cnt += 1

print(cnt)

Fixed code:
S = input()
correct = "CODEFESTIVAL2016"
cnt = 0
for i in range(len(S)):
    if S[i] == correct[i]:
        cnt += 1

print(len(S) - cnt)
Buggy code:
n = input()
a = 0
a = "CODEFESTIVAL2016"
for i, j in zip(n, a):
  if i != j:
    a += 1
print(a)
  

Fixed code:
a = input()
s = 0
for i,j in zip(a,"CODEFESTIVAL2016"):
  if i!=j:s+=1
    
print(s)
Buggy code:
s=input()
ans=0
if s[0]=='C':
    ans+=1
if s[1]='O':
    ans+=1
if s[2]='D':
    ans+=1
if s[3]='E':
    ans+=1
if s[4]='F':
    ans+=1
if s[5]='E':
    ans+=1
if s[6]='S':
    ans+=1
if s[7]='T':
    ans+=1
if s[8]='I':
    ans+=1
if s[9]='V':
    ans+=1
if s[10]='A':
    ans+=1
if s[11]='L':
    ans+=1
if s[12]='2':
    ans+=1
if s[13]='0':
    ans+=1
if s[14]='1':
    ans+=1
if s[15]='6':
    ans+=1
print(ans)

Fixed code:
s=input();ans=0
if s[0]!='C':
    ans+=1
if s[1]!='O':
    ans+=1
if s[2]!='D':
    ans+=1
if s[3]!='E':
    ans+=1
if s[4]!='F':
    ans+=1
if s[5]!='E':
    ans+=1
if s[6]!='S':
    ans+=1
if s[7]!='T':
    ans+=1
if s[8]!='I':
    ans+=1
if s[9]!='V':
    ans+=1
if s[10]!='A':
    ans+=1
if s[11]!='L':
    ans+=1
if s[12]!='2':
    ans+=1
if s[13]!='0':
    ans+=1
if s[14]!='1':
    ans+=1
if s[15]!='6':
    ans+=1
print(ans)
Buggy code:
a=input()
ans="CODEFESTIVAL2016"
diff=0
for i in range(16):
  if a[i]!=ans[i]:
    diff++
print(diff)

Fixed code:
a=input()
ans="CODEFESTIVAL2016"
diff=0
for i in range(16):
  if a[i]!=ans[i]:
    diff+=1
print(diff)
Buggy code:
s=input()
t="CODEFESTIVAL2016"
ret=0
for i range(s.len()):
  if s[i] != t[i]:
    ret+=1
print(ret)

Fixed code:
s=input()
t="CODEFESTIVAL2016"
ret=0
for i in range(len(s)):
  if s[i] != t[i]:
    ret+=1
print(ret)
Buggy code:
S = input()
T = "CODEFESTIVAL2016"
ans = 0

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

print(ans)

Fixed code:
T="CODEFESTIVAL2016"
S=input()
N=len(S)
ans=0
for i in range(N):
    if S[i]!=T[i]:
        ans+=1
print(ans)
Buggy code:
S = input()
ans = "CODEFESTIVAL2016"
a = 0
for i in range(S):
  if S[i] != ans[i]:
    a += 1
print(a)

Fixed code:
S = input()
ans = 0
for i in range(16):
    if S[i] != 'CODEFESTIVAL2016'[i]:
        ans += 1
print(ans)
Buggy code:
S1 = input()
S2 = "CODEFESTIVAL2016"
ans = 0
for i in range(16):
  if S1[i] == S2[i]:
    ans+=1
print(ans)
  

Fixed code:
S1 = input()
S2 = "CODEFESTIVAL2016"
ans = 0
for i in range(16):
  if S1[i] != S2[i]:
    ans+=1
print(ans)
Buggy code:
s = input()
x,ans = "CODEFESTIBAL2016",0
for i in range(16):
  if x[i]!=s[i]: ans += 1
print(ans)

Fixed code:
s = input()
x,ans = "CODEFESTIVAL2016",0
for i in range(16):
  if x[i]!=s[i]: ans += 1
print(ans)
Buggy code:
s="C0DEFESTIVAL2O16"
t=input()
a=0
for c, d in zip(s, t):
  if c != d:
    a += 1
print(a)

Fixed code:
s="CODEFESTIVAL2016"
t=input()
a=0
for c, d in zip(s, t):
  if c != d:
    a += 1
print(a)
Buggy code:
s=input()
co="CODEFESTIVAL2016"
cou=0
for i in range(s):
  if(s[i]!=co[i]):cou+=1
print(cou)

Fixed code:
s=input()
co="CODEFESTIVAL2016"
cou=0
for i in range(len(s)):
  if(s[i]!=co[i]):cou+=1
print(cou)
Buggy code:
s = input()
a = 'CODEFESTIVAL2016'
b = 0
for i in range(16):
  if a[i] != b[i]:
    b += 1
print(b)

Fixed code:
s=input()
t='CODEFESTIVAL2016'
a=0
for i in range(16):
  if s[i]!=t[i]:
    a+=1
print(a)
Buggy code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
gosa = 1.0 / 10**10
mod = 10**9 + 7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 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 I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()


def main():
    t = 'CODEFESTIVAL2016'
    s = S()
    r = 0
    for i in range(15):
        if t[i] != s[i]:
            r += 1
    return r


print(main())



Fixed code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
gosa = 1.0 / 10**10
mod = 10**9 + 7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 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 I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()


def main():
    t = 'CODEFESTIVAL2016'
    s = S()
    r = 0
    for i in range(16):
        if t[i] != s[i]:
            r += 1
    return r


print(main())
Buggy code:
s = input()
count = 0;
anser = "CODEFESTIVAL2016"
for i in range(0,15):
	if not s[i] == anser[i]:
		count+=1
print(count)


Fixed code:
s = input()
count = 0;
anser = "CODEFESTIVAL2016"
for i in range(0,16):
	if not s[i] == anser[i]:
		count+=1
print(count)
Buggy code:
str = "CODEFESTIVAL2016"
s =input()
cnt = 0
for i in range(16):
  if s[i]!=str[i]:
    cnt++
print(cnt)

Fixed code:
str = "CODEFESTIVAL2016"
s =input()
cnt = 0
for i in range(16):
  if s[i]!=str[i]:
    cnt+=1
print(cnt)
Buggy code:
s=input()
ans="CODEFESTIVAL2016"
ans=0
for i in range(16):
	if s[i]!=ans[i]:
		ans+=1
print(ans)

Fixed code:
s = input()
correct_s = 'CODEFESTIVAL2016'

ans = 0
for i in range(16):
    if s[i] != correct_s[i]:
        ans += 1
print(ans)
Buggy code:
# def makelist(n, m):
# 	return [[0 for i in range(m)] for j in range(n)]

# n = int(input())
# a, b = map(int, input().split())
# s = input()


rei = "CODEFESTIVAL2016"
s = input()

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

print(ans)


Fixed code:
# def makelist(n, m):
# 	return [[0 for i in range(m)] for j in range(n)]

# n = int(input())
# a, b = map(int, input().split())
# s = input()


rei = "CODEFESTIVAL2016"
s = input()

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

print(ans)
Buggy code:
    s=input()
    v="CODEFESTIVAL2016"
    cnt=0
    for i in range(16):
        if s[i]!=v[i]:
            cnt+=1
    print(cnt)

Fixed code:
s=input()
v="CODEFESTIVAL2016"
cnt=0
for i in range(16):
    if s[i]==v[i]:
        cnt+=1
print(16-cnt)