Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
n,m= map(int, input().split())
k=[]*n
a=[]*n
s=set(range(1,M+1))
for i in range(n):
    tmp=list(map(int, input().split()))
    a=tmp[1:]
    s= s & set(a)

print(len(s))


Fixed submission:
n,m= map(int, input().split())
k=[]*n
a=[]*n
s=set(range(1,m+1))
for i in range(n):
    tmp=list(map(int, input().split()))
    a=tmp[1:]
    s= s & set(a)

print(len(s))

Buggy python submission (verdict: Runtime Error):
n,m= map(int, input().split())
k=[]*n
a=[]*n
s=set(range(1,M+1))
for i in range(n):
    tmp=list(map(int, input().split()))
    k[i]=tmp[0]
    a[i]=tmp[1:]
    s= s & set(a[i])

print(len(s))




Fixed submission:
n,m= map(int, input().split())
k=[]*n
a=[]*n
s=set(range(1,m+1))
for i in range(n):
    tmp=list(map(int, input().split()))
    a=tmp[1:]
    s= s & set(a)

print(len(s))

Buggy python submission (verdict: Runtime Error):
n,m= map(int, input().split())
k=[]*n
a=[]*n
s=set(range(1,M+1))
for i in range(n):
    tmp=list(map(int, input().split()))
    k[i]=tmp[0]
    a[i]=tmp[0:]
    s= s & set(a[i])

print(len(s))




Fixed submission:
n,m= map(int, input().split())
k=[]*n
a=[]*n
s=set(range(1,m+1))
for i in range(n):
    tmp=list(map(int, input().split()))
    a=tmp[1:]
    s= s & set(a)

print(len(s))
Buggy python submission (verdict: Runtime Error):
N=int(input())
p = [int(input) for _ in range(len(N))]

print(sum(p) - int(max(p)/2))


Fixed submission:
N=int(input())
p = [int(input()) for _ in range(N)]

print(sum(p) - int(max(p)/2))
Buggy python submission (verdict: Runtime Error):
N=int(input())
s = [input() for _ in range(N)]
M=int(input())
t = [input() for _ in range(M)]

l = list(set(s)) 

for k in range(len(l)):
    cnt = max(cnt, s.count(l[k]) - t.count(l[k]))

print(cnt)

Fixed submission:
N=int(input())
s = [input() for _ in range(N)]
M=int(input())
t = [input() for _ in range(M)]

l = list(set(s)) 

cnt=0
for k in range(len(l)):
    cnt = max(cnt, s.count(l[k]) - t.count(l[k]))

print(cnt)
Buggy python submission (verdict: Runtime Error):
n = input() # データの個数
a = input().split() #リストに文字列として格納
t = 0

while True:
  for i in len(n):
    if int(a(i-1)) % 2 == 0:
      a(i-1) = int(a(i-1)/2)
      if i ==n:
        t += 1
      else:
        pass
    else:
      break

print(t)


Fixed submission:
n = int(input())
a = list(map(int, input().split()))

ans = 0
t=0

while True:
    for i in range(n):  # 0 1 2 ... n-1
        if a[i] %2 ==0:
            a[i] = a[i] / 2
        else:
            t = 1
    if t != 1:
        ans += 1
    else:
        break

print(ans)

Buggy python submission (verdict: Runtime Error):
n = input() # データの個数
a = list(map(int, input().split()))
t = 0

while True:
  for i in len(n):
    if a(i-1) % 2 == 0:
      a(i-1) == a(i-1)/2
      if i ==n:
        t += 1
      else:
        pass
    else:
      break

print(t)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))

ans = 0
t=0

while True:
    for i in range(n):  # 0 1 2 ... n-1
        if a[i] %2 ==0:
            a[i] = a[i] / 2
        else:
            t = 1
    if t != 1:
        ans += 1
    else:
        break

print(ans)
Buggy python submission (verdict: Runtime Error):
c11, c12, c13 = int(input().split())
c21, c22, c23 = int(input().split())

if c11==c23 and c12==c22 and c13==c21:
  print("YES")
else:
  print("NO")

Fixed submission:
c1 = input()
c2 = input()
 
if c1[0]==c2[2] and c1[1]==c2[1] and c1[2]==c2[0]:
  print("YES")
else:
  print("NO")
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int(input().split()))
 
if a == b:
  print(a)
elif a==c:
  print(a)
elif b==c:
  print(c)
 

Fixed submission:
a, b, c = map(int, input().split())
 
if a == b:
    print(c)
elif a==c:
    print(b)
elif b==c:
    print(a)

Buggy python submission (verdict: Runtime Error):
a, b, c = int(input().split())

if a == b:
  print(a)
elif a==c:
  print(a)
elif b==c:
  print(c)



Fixed submission:
a, b, c = map(int, input().split())
 
if a == b:
    print(c)
elif a==c:
    print(b)
elif b==c:
    print(a)
Buggy python submission (verdict: Runtime Error):
O=input()
E=input()

for i in range(len(O)):
    print(O[i], E[i], sep="",end="")

Fixed submission:
O=list(input())
E=list(input()) + [""]

for i in range(len(O)):
    print(O[i], E[i], sep="",end="")
Buggy python submission (verdict: Runtime Error):
import math
n=int(input())
print(math.factorial(n)/(10**9+7))




Fixed submission:
import math
n=int(input())
print(math.factorial(n)%(10**9+7))
Buggy python submission (verdict: Runtime Error):
import sys

s = input()
t = input()

count =0
for i, c in enuemrate(s):
    if c == t[i]:
        count += 1
print count

Fixed submission:
import sys

s = raw_input()
t = raw_input()

count =0
for i, c in enumerate(s):
    if c == t[i]:
        count += 1
print count
Buggy python submission (verdict: Runtime Error):
import sys

test =False
if test:
    N = 9
    items = [1,2,4,9,5,8,7,3,6]
else:
    N = int(raw_input())
    items = raw_input().split()
    items = [int(item) for item in items]
counter = 0
i = 0
if test:
    print items
while i < N:
    if i + 1 == items[i]:
        tmp = items[i+1]
        items[i+1] = items[i]
        items[i] = tmp
        counter += 1
        if test:
            print items
    i += 1
assert i == N
if items[N-1] == N:
    tmp = items[N]
    items[N] = items[N-1]
    items[N-1] = tmp
    counter += 1
    if test:
        print items
print counter


Fixed submission:
import sys
import random


test =False
debug = False
loop = False

def main(N, items):
    counter = 0
    i = 0
    if test:
        print N, items
    if debug:
        print items
    while i < N - 1:
        if i + 1 == items[i]:
            tmp = items[i+1]
            items[i+1] = items[i]
            items[i] = tmp
            counter += 1
            if debug:
                print items
        i += 1
    assert i == N - 1
    if items[i] == N:
        tmp = items[i]
        items[i] = items[i-1]
        items[i-1] = tmp
        counter += 1
        if debug:
            print items
    print counter

if __name__ == "__main__":
    if test:
        if loop:
            while True:
                N = random.randint(2, 10)
                items = range(1, N + 1)
                assert len(items) == N
                random.shuffle(items)
                main(N, items)
        else:
            N = 4
            items = [3,2,1,4]
            main(N, items)
    else:
        N = int(raw_input())
        items = raw_input().split()
        items = [int(item) for item in items]
        main(N, items)
Buggy python submission (verdict: Time Limit Exceeded):
import sys

N = int(raw_input())
array = []
for i in range(N):
    array.append(int(raw_input()))

array.sort()

def euclid(a, b):
    while a != b:
        if a > b:
            if a % b == 0:
                return b
            a = a-b
        else:
            if b % a == 0:
                return a
            b = b-a
    return a

result = array[0]
for i in array[1:]:
    result = result * i / euclid(result, i)
print result

Fixed submission:
import sys

def scp(a, b):
    if b > a:
        tmp_a = a
        a = b
        b = tmp_a
    while b:
        r = a % b
        a = b
        b = r
    return a
    #for i in xrange(100000, 2, -1):
    #    if a % i == b % i == 0:
    #        return a * b / i
    #return a * b

N = int(raw_input())
array = []
for i in range(N):
    array.append(int(raw_input()))

array.sort()

#if array[-1] > pow(10, 9):
#    print array[-1]
#    sys.exit(0)

result = array[0]
for i in array[1:]:
    result = result / scp(result, i) * i
print result

Buggy python submission (verdict: Runtime Error):
import sys

N = int(raw_input())
array = []
for i in range(N):
    array.append(int(raw_input()))

array.sort()

def euclid(a, b):
    if a == b:
        return a
    if a > b:
        return euclid(a - b, b)
    else:
        return euclid(b - a, a)

result = array[0]
for i in array[1:]:
    result = result * i / euclid(result, i)
print result


Fixed submission:
import sys

def scp(a, b):
    if b > a:
        tmp_a = a
        a = b
        b = tmp_a
    while b:
        r = a % b
        a = b
        b = r
    return a
    #for i in xrange(100000, 2, -1):
    #    if a % i == b % i == 0:
    #        return a * b / i
    #return a * b

N = int(raw_input())
array = []
for i in range(N):
    array.append(int(raw_input()))

array.sort()

#if array[-1] > pow(10, 9):
#    print array[-1]
#    sys.exit(0)

result = array[0]
for i in array[1:]:
    result = result / scp(result, i) * i
print result
Buggy python submission (verdict: Runtime Error):
def ints():
  return [int(x) for x in input().split()]
def ii():
  return int(input())

n, k = ints()
R, S, P = ints()
cpu = input()
jibun = [0] * n

w = ['r', 's', 'p']

for i in range(n):
  c = cpu[i]
  if c=='r':
    t = ['p']
  elif c=='s':
    t = ['r']
  else:
    t = ['s']

  j = i-k
  if j>=0:
    o = jibun[j]
    te = t[0]
    if te in o:
      if len(o)==1:
        ww = w.copy()
        ww.remove(te)
        t = ww
      else:
        o.remove(te)

  jibun[i] = t

s = 0
for i in range(n):
  w = jibun[i][0]+cpu[i]
  if w=='rs':
    s += R
  elif w=='sp':
    s += S
  elif w=='pr':
    s += P
print(s)



Fixed submission:
def ints():
  return [int(x) for x in input().split()]
def ii():
  return int(input())

n, k = ints()
R, S, P = ints()
cpu = input()
jibun = [0] * n

w = ['r', 's', 'p']

for i in range(n):
  c = cpu[i]
  if c=='r':
    t = ['p']
  elif c=='s':
    t = ['r']
  else:
    t = ['s']

  j = i-k
  if j>=0:
    o = jibun[j]
    te = t[0]
    if te in o:
      if len(o)==1:
        ww = w.copy()
        ww.remove(te)
        t = ww
      else:
        o.remove(te)

  jibun[i] = t

s = 0
for i in range(n):
  w = jibun[i][0]+cpu[i]
  if w=='rs':
    s += R
  elif w=='sp':
    s += S
  elif w=='pr':
    s += P
print(s)
Buggy python submission (verdict: Time Limit Exceeded):
def ints():
  return [int(x) for x in input().split()]
def ii():
  return int(input())

N, M = ints()
A = ints()

H = []
for i in range(N):
  for j in range(N):
    x = A[i]+A[j]
    H.append((x, i, j))
H.sort()
H = list(reversed(H))
s = 0
for i in range(M):
  s += H[i][0]
print(s)


Fixed submission:
def ints():
  return [int(x) for x in input().split()]
def ii():
  return int(input())

N, M = ints()
A = ints()
A.sort()

def combinations(x):
  s = 0
  i = 0
  j = N-1
  while j>=0:
    while i<N and A[i]+A[j]<x:
      i += 1
    s += N-i

    j -= 1
    
  return s

def koufukudo(x):
  s = 0
  si = 0
  j = 0
  i = N-1
  while j<N:
    while i>=0 and A[i]+A[j]>=x:
      si += A[i]
      i -= 1
    s += si + A[j]*(N-1-i)

    j += 1
    
  return s


def bsearch(lower, upper):
  l = lower
  u = upper
  m = (l+u)//2
  c = combinations(m)
  if c<M:
    return bsearch(l, m)
  else:
    if l==m:
      return (l, c-M)
    return bsearch(m, u)

x, dm = bsearch(0, A[-1]*2+1)
print(koufukudo(x)-dm*x)
Buggy python submission (verdict: Time Limit Exceeded):
def ints():
  return [int(x) for x in input().split()]
def readi():
  return int(input())

N = readi()
A = ints()

w = 1000000007

s = 0
for k in range(60):
  n = [0, 0]
  for i in range(N):
    n[A[i]%2] += 1
    A[i] //= 2

  s += (n[0]*n[1] << k) % w

print(s%w)


Fixed submission:
def ints():
  return [int(x) for x in input().split()]
def readi():
  return int(input())

N = readi()
A = ints()

w = 1000000007

s = 0
for k in range(60):
  n = [0, 0]
  for i in range(N):
    n[A[i]%2] += 1
    A[i] >>= 1

  s += (n[0]*n[1] << k) % w

print(s%w)

Buggy python submission (verdict: Time Limit Exceeded):
def ints():
  return [int(x) for x in input().split()]
def readi():
  return int(input())

N = readi()
A = ints()

s = 0
w = 1000000007
for i in range(N-1):
  for j in range(i+1, N):
    s += (A[i] ^ A[j])
    s %= w
print(s%w)


Fixed submission:
def ints():
  return [int(x) for x in input().split()]
def readi():
  return int(input())

N = readi()
A = ints()

w = 1000000007

s = 0
for k in range(60):
  n = [0, 0]
  for i in range(N):
    n[A[i]%2] += 1
    A[i] >>= 1

  s += (n[0]*n[1] << k) % w

print(s%w)

Buggy python submission (verdict: Time Limit Exceeded):
def ints():
  return [int(x) for x in input().split()]
def readi():
  return int(input())

N = readi()
A = ints()

s = 0
for i in range(N-1):
  for j in range(i+1, N):
    s += (A[i] ^ A[j])%(10**9+7)
print(s%(10**9+7))


Fixed submission:
def ints():
  return [int(x) for x in input().split()]
def readi():
  return int(input())

N = readi()
A = ints()

w = 1000000007

s = 0
for k in range(60):
  n = [0, 0]
  for i in range(N):
    n[A[i]%2] += 1
    A[i] >>= 1

  s += (n[0]*n[1] << k) % w

print(s%w)

Buggy python submission (verdict: Time Limit Exceeded):
def ints():
  return [int(x) for x in input().split()]
def readi():
  return int(input())

N = readi()
A = ints()

s = 0
for i in range(N-1):
  for j in range(i+1, N):
    s += A[i] ^ A[j]
print(s%(10**9+7))


Fixed submission:
def ints():
  return [int(x) for x in input().split()]
def readi():
  return int(input())

N = readi()
A = ints()

w = 1000000007

s = 0
for k in range(60):
  n = [0, 0]
  for i in range(N):
    n[A[i]%2] += 1
    A[i] >>= 1

  s += (n[0]*n[1] << k) % w

print(s%w)
Buggy python submission (verdict: Time Limit Exceeded):
def ints():
  return [int(x) for x in input().split()]
def readi():
  return int(input())

H, W = ints()
A = [ints() for _ in range(H)]
B = [ints() for _ in range(H)]
D = [[abs(A[h][w]-B[h][w]) for w in range(W)] for h in range(H)]

memo = {}

memo[(0, 0)] = {D[0][0]}

for h in range(H):
  for w in range(W):
    if h==0 and w==0:
      continue 

    d = D[h][w]
    ss = set()
    if h>0:
      s = memo[(h-1, w)]
      ss |= { x+d for x in s }
      ss |= { abs(x-d) for x in s }
    if w>0:
      s = memo[(h, w-1)]
      ss |= { x+d for x in s }
      ss |= { abs(x-d) for x in s }

    memo[(h, w)] = ss

print(min(memo[(H-1, W-1)]))


Fixed submission:
def ints():
  return [int(x) for x in input().split()]
def readi():
  return int(input())

H, W = ints()
A = [ints() for _ in range(H)]
B = [ints() for _ in range(H)]
D = [[abs(A[h][w]-B[h][w]) for w in range(W)] for h in range(H)]

memo = {}
memo = {}


N=80*60
memo[(0, 0)] = 1 << (D[0][0]+N)

for h in range(H):
  for w in range(W):
    if h==0 and w==0:
      continue 

    d = D[h][w]
    f = 0
    if h>0:
      s = memo[(h-1, w)]
      f |= s<<d 
      f |= s>>d
    if w>0:
      s = memo[(h, w-1)]
      f |= s<<d
      f |= s>>d

    memo[(h, w)] = f

def min_keta(n):
  b = bin(n>>N)
  for i in range(len(b)):
    if b[-i-1]=='1':
      return i

print(min_keta(memo[(H-1, W-1)]))
Buggy python submission (verdict: Time Limit Exceeded):
from itertools import *
from collections import defaultdict
def ints():
  return [int(x) for x in input().split()]
def readi():
  return int(input())

N, K = ints()
A = ints()
S = [0] + list(accumulate(A))

def f(i):
  return (S[i]-i)%K

s = 0
for j in range(1, N+1):
  fj = f(j)
  for i in range(max(0, j-K+1), j):
    if f(i)==fj:
      s += 1
print(s)


Fixed submission:
from itertools import *
from collections import defaultdict
def ints():
  return [int(x) for x in input().split()]
def readi():
  return int(input())

N, K = ints()
A = ints()
S = [0] + list(accumulate(A))

def f(i):
  return (S[i]-i)%K

s = 0
memo = defaultdict(int)
for j in range(1, N+1):
  fj = f(j)

  if j-K>=0:
    memo[f(j-K)] -= 1
  memo[f(j-1)] += 1

  s += memo[fj]
print(s)
Buggy python submission (verdict: Runtime Error):
def ints():
  return [int(x) for x in input().split()]
def readi():
  return int(input())

def permutation(a, aa=[]):
  if len(a)<=1:
    return [aa+a]

  res = []
  for x in a:
    b = a.copy()
    b.remove(x)
    res.extend(permutation(b, aa+[x]))

  return res


N = readi()
P = [ints() for i in range(N)]

s = 0.0
ps = permutation(list(range(N)))
pn = len(ps)

for p in ps:
  for i in range(N-1):
    q = p[i]
    r = p[i+1]
    s += ((P[q][0]-P[r][0])**2+(P[q][1]-P[r][1])**2)**(0.5)/pn
print(s)


Fixed submission:
def ints():
  return [int(x) for x in input().split()]
def readi():
  return int(input())

def permutation(a, aa=[]):
  if len(a)<=1:
    return [aa+a]

  res = []
  for x in a:
    b = a.copy()
    b.remove(x)
    res.extend(permutation(b, aa+[x]))

  return res

N = readi()
P = [ints() for i in range(N)]

s = 0.0
ps = permutation(list(range(N)))
pn = len(ps)

for p in ps:
  for i in range(N-1):
    q = p[i]
    r = p[i+1]
    s += ((P[q][0]-P[r][0])**2+(P[q][1]-P[r][1])**2)**(0.5)/pn
print(s)
Buggy python submission (verdict: Runtime Error):
n,a,b = map(int, input().split())
print(min(n * a , b)

Fixed submission:
n,a,b = map(int, input().split())
print(min(n * a , b))
Buggy python submission (verdict: Runtime Error):
#https://note.nkmk.me/python-gcd-lcm/
#lcm(a, b) = a * b / gcd(a, b)
import math

a, b = map(int, input().split(' '))

def lcm(a, b):
    return a * b / math.gcd(a, b)

print(int(lcm(a, b)))

Fixed submission:
#https://note.nkmk.me/python-gcd-lcm/
#lcm(a, b) = a * b / gcd(a, b)
import fractions

a, b = map(int, input().split(' '))

def lcm(a, b):
    return a * b / fractions.gcd(a, b)

print(int(lcm(a, b)))
Buggy python submission (verdict: Runtime Error):
a = (int(i) for i in input().split()) 
b = a[0] + a[1]
c= a[0] - a[1]
d= a[0] * a[1]

print(max([b,c,d])

Fixed submission:
a,b= (int(i) for i in input().split()) 
c = a + b
d = a-b
e = a*b

print(max([c,d,e]))
Buggy python submission (verdict: Time Limit Exceeded):
N,Q = (int(i) for i in input().split())  
S = input()
for _ in range(Q):
    l,r = (int(i) for i in input().split())  
    s = S[l-1:r]
    count = 0
    for i in range(len(s) - 1):
        if s[i] + s[i+1] == 'AC':
            count += 1
    print(count)

Fixed submission:
N,Q = (int(i) for i in input().split())  
S = input()
AC_count = [0] * N
for i in range(1,N):
    AC_count[i] = AC_count[i - 1]
    if S[i - 1] + S[i] == 'AC':
        AC_count[i] += 1

for _ in range(Q):
    l,r = (int(i) for i in input().split())
    ans = AC_count[r-1] - AC_count[l-1] 
    print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N,M = (int(i) for i in input().split())  

kens = []
ps = [0] * M
ys = [0] * M
for _ in range(N):
    kens.append([])
for i in range(M):
    p,y = (int(i) for i in input().split())
    ps[i] = p
    ys[i] = y
    kens[p-1].append(y)

#print(len(kens))
kens_s = [0] * N
for i in range(N):
    kens_s[i] = sorted(kens[i])

for i in range(M):
    #print(ps[i]-1)
    num = kens_s[ps[i]-1].index(ys[i]) + 1
    print('{0:06d}'.format(ps[i]) + '{0:06d}'.format(num))


Fixed submission:
def search(l,x):
    min_ = 0
    max_ = len(l) - 1
    k = int((min_+max_)/2)
    while(abs(min_-max_) > 1):
        if l[k] > x:
            max_ = k
        elif l[k] < x:
            min_ = k
        else:
            max_ = k
            min_ = k
            break

        k = int((min_+max_)/2)

    if l[max_] == x:
        return max_
    return min_


#print(search([1,5,6,8,12,17,100,101,150],101))
N,M = (int(i) for i in input().split())  

kens = []
ps = [0] * M
ys = [0] * M
for _ in range(N):
    kens.append([])
for i in range(M):
    p,y = (int(i) for i in input().split())
    ps[i] = p
    ys[i] = y
    kens[p-1].append(y)

#print(len(kens))
kens_s = [0] * N
for i in range(N):
    kens_s[i] = sorted(kens[i])

for i in range(M):
    #print(ps[i]-1)
    num = search(kens_s[ps[i]-1],ys[i]) + 1
    print('{0:06d}'.format(ps[i]) + '{0:06d}'.format(num))
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
H=list(map(int,input().split()))
C=0
for i in range(N):
    for j in range(N-i-1):
        if H[j+i+1]<H[i]-1:
            C=C+1
        else:
            pass
if C==0:
    print('Yes')
else:
    print('No')

Fixed submission:
N=int(input())
H=list(map(int,input().split()))
C=0
for i in range(N-1):
    if C>=2:
        break
    elif H[i]>H[i+1]+1:
        C=C+2
        break
    elif H[i]>H[i+1]:
        C=C+1
    elif H[i]<H[i+1]:
        C=0
if C<2:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Time Limit Exceeded):
A,B,C,D=map(int,input().split())
n=0
for i in range(B-A+1):
    if (A+i)%C != 0 and (A+i)%D != 0:
        n=n+1
print(n)

Fixed submission:
def euclid(a,b):
	c=0
	if (a-b)<0:
		c=a
		a=b
		b=c
	r=-1
	while r!=0:
		r=a%b
		a=b
		b=r
	return a

A,B,C,D=map(int,input().split())
c1=(A-1)//C
d1=(A-1)//D
c2=B//C
d2=B//D
k=euclid(C,D)
CD=C*D//k
cd1=(A-1)//CD
cd2=B//CD
c3=c2-c1
d3=d2-d1
cd3=cd2-cd1
print(B-A+1-c3-d3+cd3)
Buggy python submission (verdict: Runtime Error):
n = int(input())
li=[]
re=[]
for i in range(n):
	li.append(list(map(int,input().split())))
	if li[i][0] >= li[i][1] and li[i][1] <= li[i][3]:
		Lim=li[i][0]%li[i][1]
		if li[i][1] == li[i][3]:
			pass
		else:
			while Lim+li[i][3]-li[i][1]<li[i][1]:
				Lim=Lim+li[i][3]-li[i][1]
		if li[i][2] >= Lim:
			re.append("Yes")
		else:
			re.append("No")
	else:
		re.append("No")
for value in re:
 print(value)

Fixed submission:
N=int(input())
li = list(map(int,input().split()))
M=0
for i in range(N-1):
	if li[i]==li[i+1]:
		li[i+1]=li[i+1]+10000
		M=M+1
print(M)
Buggy python submission (verdict: Runtime Error):
a, b = (int(i) for i in input().split())  
print("{}{}".format(b, a))

Fixed submission:
a, b = (i for i in input().split())
print("{}{}".format(b, a))
Buggy python submission (verdict: Runtime Error):
import math
def lcm(x, y):
    return int((x * y) / math.gcd(x, y))
  

A, B = map(int, input().split())
print(lcm(A, B))

Fixed submission:
from fractions import gcd

A, B = map(int, input().split())

print(A * B // gcd(A, B))

Buggy python submission (verdict: Runtime Error):
import math
def lcm(x, y):
    return (x * y) // math.gcd(x, y)
A, B = map(int, input().split())
print(lcm(A, B))

Fixed submission:
from fractions import gcd

A, B = map(int, input().split())

print(A * B // gcd(A, B))
Buggy python submission (verdict: Runtime Error):
import math, sys
N = int(input())
x = math.floor(N/1.08)
c = [x-1, x, x+1]
C = c*1.08
for i, j in zip(c, C):
    if j == N:
        print(i)
        sys.exit()
print(":(")

Fixed submission:
N = int(input())
import math, sys
x = math.floor(N/1.08)
c = [x-1, x, x+1]
C = [i*1.08 for i in c]
for i, j in zip(c, C):
    if math.floor(j) == N:
        print(int(i))
        sys.exit()
print(":(")
Buggy python submission (verdict: Runtime Error):
X = int(input())]


DP = [0 for i in range(1000000)]
DP[0] = 1
a = [100, 101, 102, 103, 104, 105]
for i in a:
    for j in range(X):
        if DP[j] == 1:
            DP[j + i] = 1
print(DP[X])

Fixed submission:
X = int(input())
import sys
q = X // 100
r = X % 100
if r >= 0 and r <= 5 * q:
    print(1)
    sys.exit()
print(0)

Buggy python submission (verdict: Runtime Error):
X = int(input())
DP = [0 for i in range(100000)]
DP[0] = 1
a = [100, 101, 102, 103, 104, 105]
for i in a:
    for j in range(X):
        if DP[j] == 1:
            DP[j + i] = 1
print(DP[X])

Fixed submission:
X = int(input())
import sys
q = X // 100
r = X % 100
if r >= 0 and r <= 5 * q:
    print(1)
    sys.exit()
print(0)

Buggy python submission (verdict: Runtime Error):
X = int(input())
DP = [0 for i in range(100000)]
DP[0] = 1
a = [100, 101, 102, 103, 104, 105]
for i in a:
    for j in range(X):
        if DP[j] == 1:
            DP[j + i] = 1
print(DP[X])

Fixed submission:
X = int(input())
import sys
q = X // 100
r = X % 100
if r >= 0 and r <= 5 * q:
    print(1)
    sys.exit()
print(0)