Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
n=int(input())
v=list(map(int,input().split()))
v.insert(0,0) #数合わせ
check=0 #全部同じ数字か？0なら全部同じ数字
now=v[1]
for i in range(2,n):
    if now!=v[i]:
        check=1
        break
        
odd=[]
even=[]
for i in range(1,n+1):
    if i%2==1:
        odd.append(v[i])
    else:
        even.append(v[i])
        
odd2=sorted(odd)
even2=sorted(even)
now_odd,now_even=odd2[0],even2[0]
rensa_odd,rensa_even=1,1
half=n//2
count_odd=[]
count_even=[]

for i in range(1,half):
    if odd2[i]==now_odd:
        rensa_odd+=1
    else:
        count_odd.append([rensa_odd,now_odd])
        now_odd=odd2[i]
        rensa_odd=1
count_odd.append([rensa_odd,now_odd])

for i in range(1,half):
    if even2[i]==now_even:
        rensa_even+=1
    else:
        count_even.append([rensa_even,now_even])
        now_even=even2[i]
        rensa_even=1
count_even.append([rensa_even,now_even])
count_odd2=sorted(count_odd,reverse=True)
count_even2=sorted(count_odd,reverse=True)

if check==0:
    print(half)
else:
    if count_odd2[0][1]!=count_even2[0][1]: #最頻値が違う
        print((half-count_odd2[0][0])+(half-count_even2[0][0]))
    else:
        if len(count_odd2)==1:
            print((half-count_odd2[0][0])+(half-count_even2[1][0]))
        elif len(count_even2)==1:
            print((half-count_odd2[1][0])+(half-count_even2[0][0]))
        else:
            print(min((half-count_odd2[0][0])+(half-count_even2[1][0]),(half-count_odd2[1][0])+(half-count_even2[0][0])))

Fixed submission:
n=int(input())
v=list(map(int,input().split()))
v.insert(0,0) #数合わせ
check=0 #全部同じ数字か？0なら全部同じ数字
now=v[1]
for i in range(2,n):
    if now!=v[i]:
        check=1
        break
        
odd=[]
even=[]
for i in range(1,n+1):
    if i%2==1:
        odd.append(v[i])
    else:
        even.append(v[i])
        
odd2=sorted(odd)
even2=sorted(even)
now_odd,now_even=odd2[0],even2[0]
rensa_odd,rensa_even=1,1
half=n//2
count_odd=[]
count_even=[]

for i in range(1,half):
    if odd2[i]==now_odd:
        rensa_odd+=1
    else:
        count_odd.append([rensa_odd,now_odd])
        now_odd=odd2[i]
        rensa_odd=1
count_odd.append([rensa_odd,now_odd])

for i in range(1,half):
    if even2[i]==now_even:
        rensa_even+=1
    else:
        count_even.append([rensa_even,now_even])
        now_even=even2[i]
        rensa_even=1
count_even.append([rensa_even,now_even])
count_odd2=sorted(count_odd,reverse=True)
count_even2=sorted(count_even,reverse=True)
#print(count_even2)

if check==0:
    print(half)
else:
    if count_odd2[0][1]!=count_even2[0][1]: #最頻値が違う
        print((half-count_odd2[0][0])+(half-count_even2[0][0]))
    else:
        if len(count_odd2)==1:
            print((half-count_odd2[0][0])+(half-count_even2[1][0]))
        elif len(count_even2)==1:
            print((half-count_odd2[1][0])+(half-count_even2[0][0]))
        else:
            print(min((half-count_odd2[0][0])+(half-count_even2[1][0]),(half-count_odd2[1][0])+(half-count_even2[0][0])))
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=input()
b=a[len(a)-1]
word1=[a]
word2=[b]
c=0

for i in range(n-1):
    aa=input()
    bb=aa[0]
    if aa not in word1 and word2[i]==bb:
        word1.append(aa)
        top=aa[len(aa)-1]
        word2.append(top)
    else:
        c=1
        
print("Yes" if c==0 else "No")

Fixed submission:
n=int(input())
a=input()
b=a[len(a)-1]
word1=[a]
word2=[b]
c=0

for i in range(n-1):
    aa=input()
    bb=aa[0]
    if aa not in word1 and word2[i]==bb:
        word1.append(aa)
        top=aa[len(aa)-1]
        word2.append(top)
    else:
        c=1
        break
        
print("Yes" if c==0 else "No")
Buggy python submission (verdict: Runtime Error):
import fractions

n,X=map(int,input().split())
x=list(map(int,input().split()))
a=abs(x[0]-X)
for i in range(1,n):
    b=abs(x[i]-X)
    ans=fractions.gcd(a,b)
    a=ans
print(ans)

Fixed submission:
import fractions

n,X=map(int,input().split())
x=list(map(int,input().split()))
ans=abs(x[0]-X)
for i in range(1,n):
    b=abs(x[i]-X)
    ans=fractions.gcd(ans,b)
print(ans)

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

n,X=map(int,input().split())
x=list(map(int,input().split()))
x.append(X)
x2=sorted(x)
a=x2[1]-x2[0]
if len(x2)<=2:
    print(a)
else:
    for i in range(1,n-1):
        b=x2[i+1]-x2[i]
        ans=fractions.gcd(a,b)
        a=ans
    print(ans)

Fixed submission:
import fractions

n,X=map(int,input().split())
x=list(map(int,input().split()))
ans=abs(x[0]-X)
for i in range(1,n):
    b=abs(x[i]-X)
    ans=fractions.gcd(ans,b)
print(ans)

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

n,X=map(int,input().split())
x=list(map(int,input().split()))
x.append(X)
x2=sorted(x)
a=x2[1]-x2[0]
if len(x2)==2:
    print(a)
else:
    for i in range(1,n-1):
        b=x2[i+1]-x2[i]
        ans=fractions.gcd(a,b)
        a=ans
    print(ans)

Fixed submission:
import fractions

n,X=map(int,input().split())
x=list(map(int,input().split()))
ans=abs(x[0]-X)
for i in range(1,n):
    b=abs(x[i]-X)
    ans=fractions.gcd(ans,b)
print(ans)

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

n,X=map(int,input().split())
x=list(map(int,input().split()))
x.append(X)
x2=sorted(x)
a=x2[1]-x2[0]
if len(x2)==2:
    print(a)
else:
    for i in range(1,n-1):
        b=x2[i+1]-x2[i]
        ans=fractions.gcd(a,b)
        a=b
    print(ans)

Fixed submission:
import fractions

n,X=map(int,input().split())
x=list(map(int,input().split()))
ans=abs(x[0]-X)
for i in range(1,n):
    b=abs(x[i]-X)
    ans=fractions.gcd(ans,b)
print(ans)
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
num=1
count=0
for i in range(n):
    if a[i]%2==0:
        num=num*a[i]
while num%2==0:
    num=num/2
    count+=1
print(count)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
count=0
for i in range(n):
    if a[i]%2==0:
        num=a[i]
        while num%2==0:
            num /=2
            count+=1
print(count)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
sum_=[a[0]]
num=a[0]
for i in range(1,n):
    num=num+a[i]
    sum_.append(num)
count={}
for i in range(n):
    if sum_[i] in count.keys():
        count[sum_[i]]+=1
    else:
        count[sum_[i]]=1
ans=0
for i in count.values():
    ans+=i*(i-1)//2
if 0 in count.keys():
    ans+=count[0]
print(ans)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
sum_=[a[0]]
num=a[0]
for i in range(1,n):
    num=num+a[i]
    sum_.append(num)
count={}
for i in range(n):
    if sum_[i] in count.keys():
        count[sum_[i]]+=1
    else:
        count[sum_[i]]=1
ans=0
for i in count.values():
    ans+=i*(i-1)//2
if 0 in count.keys():
    ans+=count[0]
print(ans)
Buggy python submission (verdict: Runtime Error):
s=list(input())
if s[0]==s[1] or s[0]==s[2] or s[1]==s[2]:
    print(″No″)
else:
    print(″Yes″)

Fixed submission:
s=list(input())
if s[0]==s[1] or s[0]==s[2] or s[1]==s[2]:
    print("No")
else:
    print("Yes")

Buggy python submission (verdict: Runtime Error):
s=input()
if s[0]==s[1] or s[0]==s[2] or s[1]==s[2]:
    print(″No″)
else:
    print(″Yes″)

Fixed submission:
s=list(input())
if s[0]==s[1] or s[0]==s[2] or s[1]==s[2]:
    print("No")
else:
    print("Yes")
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
a2=sorted(a)
num=-1
ans=0
for i in range(n):
    if a2[i]!=num:
        num=a2[i]
        total=a2.count(num)+a2.count(num-1)+a2.count(num+1)
        if total>ans:
            ans=total
    else:
        continue
print(ans)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
b=[0]*(10**5)
for i in range(n):
    if a[i]==0:
        b[0]+=1
        b[1]+=1
    elif a[i]==(10**5)-1:
        b[(10**5)-1]+=1
        b[(10**5)-2]+=1
    else:
        b[a[i]]+=1
        b[a[i]-1]+=1
        b[a[i]+1]+=1
print(max(b))
Buggy python submission (verdict: Runtime Error):
import math
N,K=map(int,input().split())
a=list(map(int,input().split()))
bef=a[0]
gcd=a[0]
max_=a[0]
for i in range(1,N):
    if max_<a[i]:
        max_=a[i]
    gcd=math.gcd(gcd,a[i])
if max_<K:
    print("IMPOSSIBLE")
else:
    if K%gcd==0:
        print("POSSIBLE")
    else:
        print("IMPOSSIBLE")

Fixed submission:
import fractions
N,K=map(int,input().split())
a=list(map(int,input().split()))
bef=a[0]
gcd=a[0]
max_=a[0]
for i in range(1,N):
    if max_<a[i]:
        max_=a[i]
    gcd=fractions.gcd(gcd,a[i])
if max_<K:
    print("IMPOSSIBLE")
else:
    if K%gcd==0:
        print("POSSIBLE")
    else:
        print("IMPOSSIBLE")
Buggy python submission (verdict: Runtime Error):
K,S=map(int,input().split())
sum=0
count=0
for i in range(K+1):
    sum+=i
    a=sum
    L=S-sum
    #print(L)
    LL=min(L,K)
    for j in range(LL+1):
        sum+=j
        if S-sum>=0 and S-sum<=K :
            count+=1
            #print(str(i)+" "+str(j))
        sum=a #jを足す前に戻す
    sum=0
print(count)            

Fixed submission:
s=input()
l=len(s)
s_list=list(s)
for i in range(l):
    if s_list[i]==",":
        s_list[i]=" "
new="".join(s_list)
print(new)
Buggy python submission (verdict: Time Limit Exceeded):
#ABC51-B

K,S=map(int,input().split())
sum=0
count=0
for i in range(K+1):
    sum+=i
    a=sum
    L=S-sum
    #print(L)
    LL=min(L,K)
    for j in range(LL+1):
        sum+=j
        if sum==S: #X＝Sの場合
            count+=1
            #print(str(i)+" "+str(j))
            break
        if S-sum>=0 and S-sum<=K :
            count+=1
            #print(str(i)+" "+str(j))
        sum=a #jを足す前に戻す
    sum=0
print(count)            

Fixed submission:
K,S=map(int,input().split())
count=0
for x in range(K+1):
    for y in range(min(K+1,S-x+1)):
        z=S-x-y
        if 0<=z<=K:
            count+=1
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
K,S=map(int,input().split())
sum=0
count=0
for i in range(K+1):
    sum+=i
    a=sum
    L=S-sum
    #print(L)
    LL=min(L,K)
    for j in range(LL+1):
        sum+=j
        if sum==S: #X＝Sの場合
            count+=1
            #print(str(i)+" "+str(j))
            break
        if S-sum>=0 and S-sum<=K :
            count+=1
            #print(str(i)+" "+str(j))
        sum=a #jを足す前に戻す
    sum=0
print(count)            

Fixed submission:
K,S=map(int,input().split())
count=0
for x in range(K+1):
    for y in range(min(K+1,S-x+1)):
        z=S-x-y
        if 0<=z<=K:
            count+=1
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
K,S=map(int,input().split())
sum=0
count=0
for i in range(K+1):
    sum+=i
    a=sum
    for j in range(K+1):
        sum+=j
        if sum==S: #X＝Sの場合
            count+=1
            #print(str(i)+" "+str(j))
            break
        if S-sum>=0 and S-sum<=K :
            count+=1
            #print(str(i)+" "+str(j))
        sum=a #jを足す前に戻す
    sum=0
print(count)            

Fixed submission:
K,S=map(int,input().split())
count=0
for x in range(K+1):
    for y in range(min(K+1,S-x+1)):
        z=S-x-y
        if 0<=z<=K:
            count+=1
print(count)
Buggy python submission (verdict: Runtime Error):
N,K=map(int,input().split())
n=list(map(int, input().split()))
m=n.sort()
print(sum(m[0:K]))


Fixed submission:
N,K=map(int,input().split())
n=list(map(int, input().split()))
m=sorted(n)
print(sum(m[0:K]))
Buggy python submission (verdict: Runtime Error):
A = list[map(int, input().split())]
count = 0
for a in A:
  count += 1
  if a == 0:
    print(count)
    exit()

  

Fixed submission:
A = list(map(int, input().split()))
count = 0
for a in A:
  count += 1
  if a == 0:
    print(count)
    exit()
Buggy python submission (verdict: Runtime Error):
X, Y = map(int, input().split())
for a in range(1, X):
  if 2*a + 4*(x-a) == Y:
    print("Yes")
    exit()
print("No")

Fixed submission:
X, Y = map(int, input().split())
for a in range(X+1):
  if 2*a + 4*(X-a) == Y:
    print("Yes")
    exit()
print("No")

Buggy python submission (verdict: Runtime Error):
X, Y = map(int, input().split)
for a in range(1, X+1):
  if 2*a + 4*(x-a) == Y:
    print("Yes")
    exit()
print("No")

Fixed submission:
X, Y = map(int, input().split())
for a in range(X+1):
  if 2*a + 4*(X-a) == Y:
    print("Yes")
    exit()
print("No")
Buggy python submission (verdict: Runtime Error):
X, N = map(int, input().split())
A = [map(int, input().split())]
a = 0
while True:
  if X-a in A:
    if X+a in A:
    a += 1
    else:
      print(X+a)
      break
  else:
    print(X-a)
    break

Fixed submission:
X, N = map(int, input().split())
A = list(map(int, input().split()))
a = 0
while True:
  if X-a not in A:
      print(X-a)
      break
  if X+a not in A:
      print(X+a)
      break
  a += 1

Buggy python submission (verdict: Runtime Error):
X, N = map(int, input().split())
A = [map(int, input().split())]
a = 0
while True:
  if X-a in A:
    if X+a in A:
    a +=1
    else:
      print(X+a)
      exit()
  else:
    print(X-a)
    exit()

Fixed submission:
X, N = map(int, input().split())
A = list(map(int, input().split()))
a = 0
while True:
  if X-a not in A:
      print(X-a)
      break
  if X+a not in A:
      print(X+a)
      break
  a += 1

Buggy python submission (verdict: Runtime Error):
X, N = map(int, input().split())
A = [int(input()) for i in range(N)]
a = 0
while True:
  if X-a in A:
    if X+a in A:
    a +=1
    else:
      print(X+a)
      exit()
  else:
    print(X-a)
    exit()


Fixed submission:
X, N = map(int, input().split())
A = list(map(int, input().split()))
a = 0
while True:
  if X-a not in A:
      print(X-a)
      break
  if X+a not in A:
      print(X+a)
      break
  a += 1
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))
count = 0
for a in A:
  B = []
  for b in A:
    B.append(a%b)
  if B.count(0) == 1:
    count += 1
print(count)


Fixed submission:
from collections import Counter
n = int(input())
a = list(map(int, input().split()))
a.sort()
c = Counter(a)
m = max(a) + 1
dp = [False]*m
ans = 0
for ai in a:
    if dp[ai]:
        continue
    if c[ai] == 1:
        ans += 1
    for i in range(ai, m, ai):
        dp[i] = True
print(ans)
Buggy python submission (verdict: Runtime Error):
import math
A,B,H,M=map(int, input().split())
a=math.pi
b=math.cos(a*((60*H-11M)/360))
Z=A**2+B**2-2*A*B*b
print(Z**(1/2))

Fixed submission:
import math
A,B,H,M=map(int, input().split())
a=math.pi
b=math.cos(a*((60*H-11*M)/360))
Z=A**2+B**2-2*A*B*b
print(Z**(1/2))

Buggy python submission (verdict: Runtime Error):
import math
A,B,H,M=map(int, input().split())
a=math.pi
b=math.cos(a*((48H+M)/360))
Z=A**2+B**2-2ABb
print(Z**(1/2))

Fixed submission:
import math
A,B,H,M=map(int, input().split())
a=math.pi
b=math.cos(a*((60*H-11*M)/360))
Z=A**2+B**2-2*A*B*b
print(Z**(1/2))

Buggy python submission (verdict: Runtime Error):
import math
A,B,H,M=map(int, input.split())
a=math.pi
b=math.cos(a*((48H+M)/360))
Z=A**2+B**2-2ABb
print(Z**(1/2))

Fixed submission:
import math
A,B,H,M=map(int, input().split())
a=math.pi
b=math.cos(a*((60*H-11*M)/360))
Z=A**2+B**2-2*A*B*b
print(Z**(1/2))
Buggy python submission (verdict: Runtime Error):
N,M=map(int,input().split())
print(N*(N-1)//2+M*(M-1)//2)

S=input()
T=S[:(len(S)-1)//2-1]
U=S[(len(S)+3)//2-1:]
if S==S[::-1]:
    if T==T[::-1]:
        if U==U[::-1]:
            print('Yes')
        else:print('No')
    else:print('No')
else:print('No')


Fixed submission:
S=input()
T=S[:(len(S)-1)//2]
U=S[(len(S)+3)//2-1:]
if S==S[::-1]:
    if T==T[::-1]:
        if U==U[::-1]:
            print('Yes')
        else:print('No')
    else:print('No')
else:print('No')
Buggy python submission (verdict: Runtime Error):
S=len(input())
print(x*S)

Fixed submission:
S=len(input())
print('x'*S)
Buggy python submission (verdict: Runtime Error):
N,A=map(int,input().split())
B=sorted(list(map(int,input().split())))
for j in range(A):
    B.pop()
print(sum(B))

Fixed submission:
N,A=map(int,input().split())
B=sorted(list(map(int,input().split())))
for j in range(A):
    if B!=[]: B.pop()
print(sum(B))

Buggy python submission (verdict: Runtime Error):
N,A=map(int,input().split())
B=sorted(list(int(input()) for i n range(N)))
for j in range(A):
    B.pop()
print(sum(B))

Fixed submission:
N,A=map(int,input().split())
B=sorted(list(map(int,input().split())))
for j in range(A):
    if B!=[]: B.pop()
print(sum(B))
Buggy python submission (verdict: Runtime Error):
N=int(input())
S=input()
print(sum(S[i]==A and S[i+1]==B and S[i+2]==C for i in range(N-2)))    

Fixed submission:
N=int(input())
S=input()
print(sum(S[i]=='A' and S[i+1]=='B' and S[i+2]=='C' for i in range(N-2)))
Buggy python submission (verdict: Runtime Error):
a,b=input().split()
print(b,a sep='')


Fixed submission:
a,b=input().split()
print(b,a, sep='')
Buggy python submission (verdict: Runtime Error):
N = int(input())
S, T = input().split()
A = ''
for a in range(N):
  A.append(S[a]+T[a])
print(A)



Fixed submission:
N = int(input())
S, T = input().split()
A = ''
for a in range(N):
  A += S[a]+T[a]
print(A)
Buggy python submission (verdict: Runtime Error):
A=['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O',
   'P','Q','R','S','T','U','V','W','X','Y','Z']
N=int(input())
X=input()
for i in range(0,len(X)-1):
  n=(A.index(X[i])+N)%26
  X[i]=A[n]
print(X)

Fixed submission:
A=['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O',
   'P','Q','R','S','T','U','V','W','X','Y','Z']
N=int(input())
x=input()
X=[j for j in x]
for i in range(0,len(X)):
  n=(A.index(X[i])+N)%26
  X[i]=A[n]
Y=''
for i in X:
  Y+=i
print(Y)

Buggy python submission (verdict: Runtime Error):
A=['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O',
   'P','Q','R','S','T','U','V','W','X','Y','Z']
N=int(input())
X=input()
for i in range(0,len(X)-1):
  n=(A.index(i)+N)%26
  X[i]=A[n]
print(X)

Fixed submission:
A=['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O',
   'P','Q','R','S','T','U','V','W','X','Y','Z']
N=int(input())
x=input()
X=[j for j in x]
for i in range(0,len(X)):
  n=(A.index(X[i])+N)%26
  X[i]=A[n]
Y=''
for i in X:
  Y+=i
print(Y)

Buggy python submission (verdict: Runtime Error):
A=['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O',
   'P','Q','R','S','T','U','V','W','X','Y','Z']
N=int(input())
X=input()
for i in range(0,len(X)):
  n=(A.index(i)+N)%26
  X[i]=A[n]
print(X)


Fixed submission:
A=['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O',
   'P','Q','R','S','T','U','V','W','X','Y','Z']
N=int(input())
x=input()
X=[j for j in x]
for i in range(0,len(X)):
  n=(A.index(X[i])+N)%26
  X[i]=A[n]
Y=''
for i in X:
  Y+=i
print(Y)
Buggy python submission (verdict: Runtime Error):
N=int(input())
for i range(1,10):
    if N%i==0 and N//i<=9:
        print('Yes')
else:print('No')


Fixed submission:
N=int(input())
for i in range(1,10):
    if N%i==0 and N//i<=9:
        print('Yes')
        break
else:print('No')

Buggy python submission (verdict: Runtime Error):
N=int(input())
for i range(1,int(int(N**0.5)+1):
    if N%i==0 and N//i<=9:
        print('Yes')
else:print('No')

Fixed submission:
N=int(input())
for i in range(1,10):
    if N%i==0 and N//i<=9:
        print('Yes')
        break
else:print('No')

Buggy python submission (verdict: Runtime Error):
for i range(1,int(int(input())**0.5)+1):
    if N%i==0 and N//i<=9:
        print('Yes')
else:print('No')


Fixed submission:
N=int(input())
for i in range(1,10):
    if N%i==0 and N//i<=9:
        print('Yes')
        break
else:print('No')
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
cnt=N-1
for i in range(1,N):
    if N%i== 0:
        cnt=min(cnt,N//i+i-2)
print(cnt)

Fixed submission:
N=int(input())
cnt=N-1
for i in range(1,int(N**0.5)+1):
    if N%i== 0:
        cnt=min(cnt,N//i+i-2)
print(cnt)

Buggy python submission (verdict: Runtime Error):
N=int(input())
cnt=N-1
for i in range(1,N):
    if N%i==o:
        cnt=min(cnt,N//i+i-2)
print(cnt)

Fixed submission:
N=int(input())
cnt=N-1
for i in range(1,int(N**0.5)+1):
    if N%i== 0:
        cnt=min(cnt,N//i+i-2)
print(cnt)
Buggy python submission (verdict: Runtime Error):
N=int(input())
S=0
A=list(map(int,input().split()))
for i in range(N):
  S += 1/i
print(1/S)

Fixed submission:
N=int(input())
S=0
A=list(map(int,input().split()))
for i in A:S+=1/i
print(1/S)

Buggy python submission (verdict: Runtime Error):
N=int(input())
S=0
A=list(map(int,input().split()))
for i in range(N):S+=1/i
print(1/S)


Fixed submission:
N=int(input())
S=0
A=list(map(int,input().split()))
for i in A:S+=1/i
print(1/S)
Buggy python submission (verdict: Runtime Error):
N=int(input())
L=list(int(input()) for _ in range(N))
M=L[::-1]
for i in range(N-1):
    if M[i]+1<M[i+1]:
        print('No')
        break
    elif M[i]+1==M[i+1]:
        M[i+1]=M[i]
else:print('Yes')

Fixed submission:
N=int(input())
L=list(map(int,input().split()))
M=L[::-1]
for i in range(N-1):
    if M[i]+1<M[i+1]:
        print('No')
        break
    elif M[i]+1==M[i+1]:
        M[i+1]=M[i]
else:print('Yes')

Buggy python submission (verdict: Runtime Error):
N=int(input())
L=list(int(input()) for _ in range(N))
M=L[::-1]
for i in range(N-1):
    if M[i]+1<M[i+1]:
        print('No')
        break
    elif M[i]+1=M[i+1]:
        M[i+1]=M[i]
else:print('Yes')

Fixed submission:
N=int(input())
L=list(map(int,input().split()))
M=L[::-1]
for i in range(N-1):
    if M[i]+1<M[i+1]:
        print('No')
        break
    elif M[i]+1==M[i+1]:
        M[i+1]=M[i]
else:print('Yes')
Buggy python submission (verdict: Runtime Error):
import math
a,b=map(int,input().split())
print(math.ceil(a/(2b+1)))


Fixed submission:
import math
a,b=map(int,input().split())
print(math.ceil(a/(b*2+1)))
Buggy python submission (verdict: Runtime Error):
import math
n=int(input())
l=[int(input()) for i in range(5)]
print(mat.ceil(n/min(l))+4)

Fixed submission:
import math
n=int(input())
l=[int(input()) for i in range(5)]
print(math.ceil(n/min(l))+4)

Buggy python submission (verdict: Runtime Error):
import math
n=int(input())
l=[int(input()) for in range(5)]
print(mat.ceil(n/min(l))+4)


Fixed submission:
import math
n=int(input())
l=[int(input()) for i in range(5)]
print(math.ceil(n/min(l))+4)
Buggy python submission (verdict: Runtime Error):
b=int(input())
print('A' if b=='T' else 'T' if b=='A' else 'G' if b=='C' else 'C')

Fixed submission:
b=input()
print('A' if b=='T' else 'T' if b=='A' else 'G' if b=='C' else 'C')
Buggy python submission (verdict: Runtime Error):
N,M,C=map(int,input().split())
B=list(map(int,input().split()))
count=0
for i in range(N):
  A=list(map(int, input().split()))
  p=C
  for j in range(M):
    P+=A[j]*B[j]
    if p>0:
      count+=1
print(count)

Fixed submission:
N,M,C=map(int,input().split())
B=list(map(int,input().split()))
count=0
for i in range(N):
    A=list(map(int,input().split()))
    p=C
    for j in range(M):p+=A[j]*B[j]
    if p>0:count+=1
print(count)
Buggy python submission (verdict: Runtime Error):
n,m=map(int, input().split())
A=set(range(1, m+1))
for _ in range(n):
  a,*b=map(int, input().split())
  A = A & set(*b)
print(len(A))

Fixed submission:
n,m=map(int, input().split())
A=set(range(1, m+1))
for _ in range(n):
  a,*b=map(int, input().split())
  A = A & set(b)
print(len(A))
Buggy python submission (verdict: Runtime Error):
P=[int(input()) for i in range(int(input()))]
print(sum(p)-max(p)//2)


Fixed submission:
P=[int(input()) for i in range(int(input()))]
print(sum(P)-max(P)//2)
Buggy python submission (verdict: Runtime Error):
S=input()
print(min(abs(753-int(S[i,i+3])) for i in range(len(S)-2)))

Fixed submission:
S=input()
print(min(abs(753-int(S[i:i+3])) for i in range(len(S)-2)))
Buggy python submission (verdict: Runtime Error):
S=input().replace('1','x').replace('9','1').replace('x',9)
print(S)

Fixed submission:
S=input().replace('1','x').replace('9','1').replace('x','9')
print(S)