Harryxun/testdata huggingface dataset:
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(math.gcd(A,B))
print(lcm(A,B))

Fixed submission:
def gcd(m,n):
    x = max(m,n)
    y = min(m,n)
    while x%y != 0:
        z = x%y
        x = y
        y = z
    else:
        return y
def lcm(m,n):
    return int(m * n /gcd(m,n))

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

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(math.gcd(A,B))
print(lcm(A,B))

Fixed submission:
def gcd(m,n):
    x = max(m,n)
    y = min(m,n)
    while x%y != 0:
        z = x%y
        x = y
        y = z
    else:
        return y
def lcm(m,n):
    return int(m * n /gcd(m,n))

A,B = map( int ,input().split())
print(lcm(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(math.gcd(A,B))
print(lcm(A,B))

Fixed submission:
def gcd(m,n):
    x = max(m,n)
    y = min(m,n)
    while x%y != 0:
        z = x%y
        x = y
        y = z
    else:
        return y
def lcm(m,n):
    return int(m * n /gcd(m,n))

A,B = map( int ,input().split())
print(lcm(A,B))
Buggy python submission (verdict: Runtime Error):
n = int(stdin.readline().rstrip()[-1])

if n == '3':
    print('bon')
elif n in ['0', '1', '6', '8']:
    print('pon')
else:
    print('hon')


Fixed submission:
input = input()[-1]
if input == '3':
    print('bon')
elif input in ['0', '1', '6', '8']:
    print('pon')
else:
    print('hon')

Buggy python submission (verdict: Runtime Error):
input = input()[-1]
if input == '3':
  print('bon')
elif intpu in ['0', '1', '6', '8']:
  print('hon')
else:
  print('hon')


Fixed submission:
input = input()[-1]
if input == '3':
    print('bon')
elif input in ['0', '1', '6', '8']:
    print('pon')
else:
    print('hon')

Buggy python submission (verdict: Runtime Error):
input = input()[-1]
if input == '3':
    print('bon')
elif intpu in ['0', '1', '6', '8']:
    print('hon')
else:
    print('hon')

Fixed submission:
input = input()[-1]
if input == '3':
    print('bon')
elif input in ['0', '1', '6', '8']:
    print('pon')
else:
    print('hon')
Buggy python submission (verdict: Runtime Error):
length = input()
input_str = input()

if len(input_str) > length:
    print(input_str + '...')
else:
    print(input_str)

Fixed submission:
k = int(input())
s = input()

if len(s) > k:
    print(s[0:k] + '...')
else:
    print(s)

Buggy python submission (verdict: Runtime Error):
length = input()
input_str = input()

if len(input_str) > length:
    print(input_str + '...')
else:
    input_str

Fixed submission:
k = int(input())
s = input()

if len(s) > k:
    print(s[0:k] + '...')
else:
    print(s)
Buggy python submission (verdict: Runtime Error):
x,n=map(int,input().split())
import sys
if n==0:
    _=input()
    print(x)
    sys.exit()
    
p_list=list(map(int,input().split()))
r=list(range(100))
a=list(set(r)-set(p_list))

ans=100000
kkk=100000
for i in a:
    tem=abs(i-x)
    if ans>tem:
        ans=tem
        kkk=i
    
print(kkk)

Fixed submission:
a=input().split()
for i in range(5):
    if a[i]=='0':
        print(i+1)
Buggy python submission (verdict: Time Limit Exceeded):
A,B,N=map(int,input().split())
import math
ans=[]
for i in range(1,N+1):
    ans.append(math.floor(A*i/B)-A*math.floor(i/B))
print(max(ans))

Fixed submission:
A,B,N=map(int,input().split())
import math
if N<B:
    print(math.floor(A*N/B))
else:
    print(math.floor(A*(B-1)/B-A*math.floor((B-1)/B)))
Buggy python submission (verdict: Time Limit Exceeded):
K = int(input())
from math import gcd
ans=0
c=0
for i in range(1,K+1):
    for j in range(1,K+1):
        for k in range(1,K+1):
            c=gcd(i,j)
            ans+=gcd(c,k)
           
print(ans)

Fixed submission:
K = int(input())
from math import gcd
ans=0
c=0

for i in range(1,K+1):
    for j in range(1,K+1):
        for k in range(1,K+1):
            c=gcd(i,j)
            ans+=gcd(c,k)
           
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N,M=map(int,input().split())
while True:
    b = abs(N-M)
    if b<N:
        N=b
    else:
        break
print(N)

Fixed submission:
N,K=map(int,input().split())
a = N%K
if abs(a-K)<a:
    print(abs(a-K))
else:
    print(a)
Buggy python submission (verdict: Runtime Error):
list_1 = list(map(int,input().split()))
list_2 = list(map(int,input().split()))
list_3 = list(map(int,input().split()))

#n,m = map(int,raw_input().split())
#list_a = []
#for i in range(M) 
list_a=list_1


for x in list_2:
    list_a.append(x)


for x in list_3:
    list_a.append(x)


N = int(input())
#list_b = [int(x) for x in input().split()]
#list_b = list(map(int,input().split()))


list_b=[]
for k in range(N):
    b=int(input())
    list_b.append(b)


list_c = [0,0,0,0,0,0,0,0,0]
for i in range(N):
    for j in range(9):
        if list_a[j] == list_b[i]:
            list_c[j] = 1

flag=0
if list_c[0]==1 and list_c[1]==1 and list_c[2]==1:
    flag=1
if list_c[3]==1 and list_c[4]==1 and list_c[5]==1:
    flag=1
if list_c[6]==1 and list_c[7]==1 and list_c[8]==1:
    flag=1
if list_c[0]==1 and list_c[3]==1 and list_c[6]==1:
    flag=1
if list_c[1]==1 and list_c[4]==1 and list_c[7]==1:
    flag=1
if list_c[2]==1 and list_c[5]==1 and list_c[8]==1:
    flag=1
if list_c[0]==1 and list_c[4]==1 and list_c[8]==1:
    flag=1
if list_c[2]==1 and list_c[4]==1 and list_c[6]==1:
    flag=1
    
if flag == 1:
    print('Yes')
else:
    print('No')

Fixed submission:
n = int(input())

if n % 2 ==0:
    print(int(n/2))
else:
    print(int((n+1)/2))
Buggy python submission (verdict: Runtime Error):
n = int(input())
x = list(map(int, input().split()))
curr = 10 ** 9
ans = 0
for p in ppp:
    if p < curr:
        ans += 1
        curr = p
print(ans)

Fixed submission:
n = int(input())
x = list(map(int, input().split()))
curr = 10 ** 9
ans = 0
for p in x:
    if p < curr:
        ans += 1
        curr = p
print(ans)
Buggy python submission (verdict: Runtime Error):
x=int(input())
def hantei(n):
    for i in range(2,n):
        if n%i==0:
            return 0
    return 1

if x==2:
    pritn(2)
    exit()

while True:
    if hantei(x)==1:
        print(x)
        break
    x+=1

Fixed submission:
x=int(input())
def hantei(n):
    for i in range(2,n):
        if n%i==0:
            return 0
    return 1

if x==2:
    print(2)
    exit()

while True:
    if hantei(x)==1:
        print(x)
        break
    x+=1
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
from math import gcd
print(int(a*b/gcd(a,b)))

Fixed submission:
a,b=map(int,input().split())
from fractions import gcd
print(int(a*b/gcd(a,b)))
Buggy python submission (verdict: Runtime Error):
N = int(input())

for i in range(10):
    for j in range(10):
        if N == i*j:
            print('Yes')
        if i*j == 81 and N!=81:
            print('No')
        if N == i*j:
            break
    if N== i*j:
        break


Fixed submission:
A,B = map(int,input().split())
if A>9 or B>9:
    print(-1)
else:
    print(A*B)

Buggy python submission (verdict: Runtime Error):
N = int(input())

for i in range(10):
    for j in range(10):
        if N == i*j:
            print('Yes')
        if i*j == 81 and N!=81:
            print('No')
        if N == i*j:
            break
    if N== i*j:
        break


Fixed submission:
A,B = map(int,input().split())
if A>9 or B>9:
    print(-1)
else:
    print(A*B)
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
ans=[0]*n
for i in a:
    ans[i-1]=a.index(i)+1
print(*ans)

Fixed submission:
N =int(input())
if N%2 == 0:
    print(0.5)
else:
    print((N+1)/2/N)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
ans=[0]*n
for i in a:
    ans[i-1]=a.index(i)+1
print(*ans)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
ans=[0]*n
for i,j in enumerate(a):
    ans[j-1]=i+1
print(*ans)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
ans=[0]*n
for i in a:
    ans[i-1]=a.index(i)+1
print(*ans)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
ans=[0]*n
for i,j in enumerate(a):
    ans[j-1]=i+1
print(*ans)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
ans=[0]*n
for i in a:
    ans[i-1]=a.index(i)+1
print(' '.join(map(str,ans)))

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
ans=[0]*n
for i,j in enumerate(a):
    ans[j-1]=i+1
print(*ans)
Buggy python submission (verdict: Runtime Error):
n=int(input())
v=list(map(int,input().split()))
v.sort(reverce=True)
for i in range(n-1):
    a=v.pop()
    b=v.pop()
    v.append((a+b)/2)
    v.sort(reverse=True)
print(v[0])

Fixed submission:
n=int(input())
v=list(map(int,input().split()))
v.sort(reverse=True)
for i in range(n-1):
    a=v.pop()
    b=v.pop()
    v.append((a+b)/2)
    v.sort(reverse=True)
print(v[0])
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=[]
b=sorted(a)
mx=b[-1]
mx2=b[-2]
for i in a:
    if i==mx:
        print(mx2)
    else:
        print(mx)

Fixed submission:
n=int(input())
a=[int(input()) for _ in range(n)]
b=sorted(a)
mx=b[-1]
mx2=b[-2]
for i in a:
    if i==mx:
        print(mx2)
    else:
        print(mx)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=[]
for _ in range(n):
    a.append(int(input()))
for i in range(n):
    tem=a[i]
    del a[i]
    print(max(a))
    a.insert(i,tem)

Fixed submission:
n=int(input())
a=[int(input()) for _ in range(n)]
b=sorted(a)
mx=b[-1]
mx2=b[-2]
for i in a:
    if i==mx:
        print(mx2)
    else:
        print(mx)
Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
ans=list(range(1,n+1))
for i in range(m):
    a,b=map(int,input().split())
    if a-1 in ans:
        ans=ans[ans.index(a-1):]
    if b+1 in ans:
        ans=ans[:ans.index(b)]
print(len(ans))

Fixed submission:
n,m=map(int,input().split())
mn=0
mx=10**6
for i in range(m):
    a,b=map(int,input().split())
    mn=max(mn,a)
    mx=min(mx,b)
if mn>mx:
    print(0)
else:
    print(mx-mn+1)
Buggy python submission (verdict: Runtime Error):
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10**9)
n,m=map(int,input().split())
shop=[]
for i in range(n):
    shop.append(map(int,input().split()))
shop_sorted=sorted(shop,key=lambda x :x[0])
ans=0
cnt=0
for a,b in shop_sorted:
    tmp=cnt
    cnt=min(m,cnt+b)
    ans+=a*(cnt-tmp)
    if cnt==m:
        break
print(ans)

Fixed submission:
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10**9)
n,m=map(int,input().split())
AB=[list(map(int,input().split())) for _ in range(n)]
AB=sorted(AB,key=lambda x:x[0])
cnt=0
ans=0
for a,b in AB:
    tmp=cnt
    cnt=min(m,cnt+b)
    ans+=a*(cnt-tmp)
    if cnt==m:
        break
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
A = list(map(int,input().split()))
ANS = 1
for i in range(n):
    ANS *= A[i]
if ANS > 10**18:
    print(-1)
else:
    print(ANS)

Fixed submission:
import sys
n = int(input())
A = list(map(int,input().split()))
if A.count(0)>0:
    print(0)
else:
    ANS = 1
    for i in range(n):
        ANS *= A[i]
        if ANS > 10**18:
            print(-1)
            sys.exit()
    print(ANS)

Buggy python submission (verdict: Runtime Error):
import sys
n = int(input())
A = list(map(int,input().split()))
ANS = 1
for i in range(n):
    ANS *= A[i]
    if ANS > 10**18:
        print(-1)
        sys.exit(1)
print(ANS)

Fixed submission:
import sys
n = int(input())
A = list(map(int,input().split()))
if A.count(0)>0:
    print(0)
else:
    ANS = 1
    for i in range(n):
        ANS *= A[i]
        if ANS > 10**18:
            print(-1)
            sys.exit()
    print(ANS)
Buggy python submission (verdict: Runtime Error):
import numpy as np
a,b,h,m=map(int,input().split())
pi = np.py
x = 2*pi*(h*60+m)/720
y = 2*pi*m/60
theta=abs(x-y)
cos = np.cos(theta)
ans = (a**2+b**2-2*a*b*cos)**0.5
print(ans)




Fixed submission:
import numpy as np
a,b,h,m=map(int,input().split())
pi = np.pi
x = 2*pi*(h*60+m)/720
y = 2*pi*m/60
theta=abs(x-y)
cos = np.cos(theta)
ans = (a**2+b**2-2*a*b*cos)**0.5
print(ans)
Buggy python submission (verdict: Runtime Error):
s = input()
t = input()
n = len(s)
for i in range(n):
  if s[i] != t[i]:
    print("No")
    return 0
print("Yes")


Fixed submission:
import sys
s = input()
t = input()
n = len(s)
for i in range(n):
  if s[i] != t[i]:
    print("No")
    sys.exit()
print("Yes")

Buggy python submission (verdict: Runtime Error):
s = input()
t = input()
n = len(s)
for i in range(n):
  if s[i] != t[i]:
    print("No")
    return
print("Yes")

Fixed submission:
import sys
s = input()
t = input()
n = len(s)
for i in range(n):
  if s[i] != t[i]:
    print("No")
    sys.exit()
print("Yes")
Buggy python submission (verdict: Runtime Error):
n = int(input())
for i in range(1,10):
  for j in range(1,10):
    if i*j == n:
      print(Yes)
      exit()
print(No)

Fixed submission:
n = int(input())
for i in range(1,10):
  for j in range(1,10):
    if i*j == n:
      print("Yes")
      exit()
print("No")

Buggy python submission (verdict: Runtime Error):
n = int(input())
for i in range(1,10):
  for j in range(1,10):
    if i*j == n:
      print(Yes)
      return;
print(No)

Fixed submission:
n = int(input())
for i in range(1,10):
  for j in range(1,10):
    if i*j == n:
      print("Yes")
      exit()
print("No")

Buggy python submission (verdict: Runtime Error):
n = int(input())
for i in range(1,10):
  for j in range(1,10):
    if i*j == n:
      print(Yes)
      return 0;
print(No)

Fixed submission:
n = int(input())
for i in range(1,10):
  for j in range(1,10):
    if i*j == n:
      print("Yes")
      exit()
print("No")

Buggy python submission (verdict: Runtime Error):
n = int(input())
for i in range(1,10):
  for j in range(1,10):
    if i*j = n:
      print(Yes)
      return
print(No)

Fixed submission:
n = int(input())
for i in range(1,10):
  for j in range(1,10):
    if i*j == n:
      print("Yes")
      exit()
print("No")
Buggy python submission (verdict: Runtime Error):
n = int(input())
d = [int(i) for input().split()]
s = []
for i in range(n):
	for j in range(i):
		s.append(d[i]*d[j])
l = s.size()
for i in range(l):
	print(s[i])


Fixed submission:
n = int(input())
d = [int(i) for i in input().split()]
s = []
for i in range(n):
	for j in range(i):
		s.append(d[i]*d[j])
print(sum(s))

Buggy python submission (verdict: Runtime Error):
n = int(input())
d = [int(i) for input().split()]
s = []
for i in range(n):
	for j in range(i):
		s.append(d[i]*d[j])
n = s.size()
for i in range(n):
	print(s[i])

Fixed submission:
n = int(input())
d = [int(i) for i in input().split()]
s = []
for i in range(n):
	for j in range(i):
		s.append(d[i]*d[j])
print(sum(s))
Buggy python submission (verdict: Runtime Error):
n = int(input())
if(n%2==0):
  print(1/2)
else:
  print((n+1)/2n)

Fixed submission:
n = int(input())
if(n%2==0):
  print(1/2)
else:
  print((n+1)/2/n)

Buggy python submission (verdict: Runtime Error):
n = int(input())
if(n%2==0):
  print(1/2)
else:
  print(((n+1)/2n))

Fixed submission:
n = int(input())
if(n%2==0):
  print(1/2)
else:
  print((n+1)/2/n)

Buggy python submission (verdict: Runtime Error):
n = int(input())
if(n%2==0):
  print(1/2)
else:
  print(((n+1)/2n)

Fixed submission:
n = int(input())
if(n%2==0):
  print(1/2)
else:
  print((n+1)/2/n)
Buggy python submission (verdict: Runtime Error):
n, k, q = map(int, input().split())
A = [0]*n
for i in range(n):
  a = int(input())
  A[a-1]+=1
for j in range(n):
  if A[j] > q-k :
    print("Yes")
  else:
    print("No")

Fixed submission:
s = input()
if s == 'Sunny':
  print('Cloudy')
elif s == 'Cloudy':
  print("Rainy")
else:
  print('Sunny')
Buggy python submission (verdict: Runtime Error):
s = list(input())
a = s[::2]
b = s[1::2]
if a.count(L) == 0 and b.count(R) == 0:
  print('Yes')
else:
  print("No")

Fixed submission:
s = list(input())
a = s[::2]
b = s[1::2]
if a.count('L') == 0 and b.count('R') == 0:
  print('Yes')
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
n, k, q = map(int, input().split())
A = [0]*n
for i in range(n):
  a = int(input())
  A[a-1]+=1
for j in range(n):
  if A[j] > q-k :
    print("Yes")
  else:
    print("No")


Fixed submission:
N, K, Q = map(int, input().split())
A = [0]*N
for i in range(Q):
  a = int(input())
  A[a-1]+=1
for j in range(N):
  if A[j] > Q-K :
    print("Yes")
  else:
    print("No")

Buggy python submission (verdict: Time Limit Exceeded):
n, k, q = map(int, input().split())
a = [0]*q
for i in range(q):
  a[i] = int(input())
for i in range(n):
  if a.count(i+1) > q-k :
    print("Yes")
  else:
    print("No")

Fixed submission:
N, K, Q = map(int, input().split())
A = [0]*N
for i in range(Q):
  a = int(input())
  A[a-1]+=1
for j in range(N):
  if A[j] > Q-K :
    print("Yes")
  else:
    print("No")

Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
a = [int(i) for i in input().split()]
for i in range(m):
  b = max(a)
  c = a.index(b)
  a[c] = b//2
  if sum(a) == 0:
    print(0)
    exit()
print(sum(a))
  


Fixed submission:
N, K, Q = map(int, input().split())
A = [0]*N
for i in range(Q):
  a = int(input())
  A[a-1]+=1
for j in range(N):
  if A[j] > Q-K :
    print("Yes")
  else:
    print("No")

Buggy python submission (verdict: Time Limit Exceeded):
n, k, q = map(int, input().split())
a = [0]*q
for i in range(q):
  a[i] = int(input())
for i in range(n):
  if a.count(i+1) > q-k :
    print("Yes")
  else:
    print("No")


Fixed submission:
N, K, Q = map(int, input().split())
A = [0]*N
for i in range(Q):
  a = int(input())
  A[a-1]+=1
for j in range(N):
  if A[j] > Q-K :
    print("Yes")
  else:
    print("No")
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
c = [int(i) for i in input().split()]
s = b[a[0]-1]
i for a[i] in range(1,n):
  s += b[a[i]-1] 
  if a[i-1] + 1 ==a[i]:
    s+= c[i-1]
print(s)
  

Fixed submission:
n = int(input())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
c = [int(i) for i in input().split()]
s = 0
for i in a:
  s += b[i-1] 
  if i -1 == a[a.index(i)-1] and a.index(i)>0:
    s+= c[i-2]
print(s)

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

Fixed submission:
n = int(input())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
c = [int(i) for i in input().split()]
s = 0
for i in a:
  s += b[i-1] 
  if i -1 == a[a.index(i)-1] and a.index(i)>0:
    s+= c[i-2]
print(s)
Buggy python submission (verdict: Runtime Error):
S = list(input())
T = list(input())
s = 0
for i in range(3):
  if S[i] = T[i]:
    s += 1
print(s)
  


Fixed submission:
s = list(input())
t = list(input())
u = 0
for i in range(3):
  if s[i] == t[i]:
    u += 1
print(u)

Buggy python submission (verdict: Runtime Error):
s = list(input())
t = list(input())
s = 0
for i in range(3):
  if s[i] = t[i]:
    s += 1
print(s)
  


Fixed submission:
s = list(input())
t = list(input())
u = 0
for i in range(3):
  if s[i] == t[i]:
    u += 1
print(u)

Buggy python submission (verdict: Runtime Error):
s = list(input())
t = list(input())
s = 0
for i in range(3):
  s[i] = t[i]
  s += 1
print(s)
  


Fixed submission:
s = list(input())
t = list(input())
u = 0
for i in range(3):
  if s[i] == t[i]:
    u += 1
print(u)
Buggy python submission (verdict: Runtime Error):
n = int(input())
h = [int(i) for i in range(n)]
ans = []
a = 0
for i in range(n-1):
  if h[i] >= h[i+1]:
    a += 1
  else:
    ans.append(a)
    a = 0
print(max(ans))

Fixed submission:
n = int(input())
h = [int(i) for i in input().split()]
ans = []
a = 0
for i in range(n-1):
  if h[i] >= h[i+1]:
    a += 1
  else:
    ans.append(a)
    a = 0
ans.append(a)
print(max(ans))

Buggy python submission (verdict: Runtime Error):
n = int(input())
h = [int(i) for i in input().split()]
m = [0]
for i in range(1,n-1):
  if h[i-1] =< h[i] and h[i] >= h[i+1]:
    m.append(h.index(h[i]))
m.append(n-1)
l = [m[i] - m[i-1] for i in range(1,len(m))]
if m == [0,n-1] and h[0] < h[1]:
  print("0")
else:
  print(max(l))


Fixed submission:
n = int(input())
h = [int(i) for i in input().split()]
ans = []
a = 0
for i in range(n-1):
  if h[i] >= h[i+1]:
    a += 1
  else:
    ans.append(a)
    a = 0
ans.append(a)
print(max(ans))

Buggy python submission (verdict: Runtime Error):
n = int(input())
h = [int(i) for i in input().split()]
m = [0]
for i in range(1,n-1):
  if h[i-1] < h[i] and h[i] >= h[i+1]:
    m.append(h.index(h[i]))
m.append(n-1)
l = [m[i] - m[i-1] for i in range(1,len(m))]
if m == [0,n-1] and h[0] < h[1]:
  print("0")
else:
  print(max(l))


Fixed submission:
n = int(input())
h = [int(i) for i in input().split()]
ans = []
a = 0
for i in range(n-1):
  if h[i] >= h[i+1]:
    a += 1
  else:
    ans.append(a)
    a = 0
ans.append(a)
print(max(ans))
Buggy python submission (verdict: Runtime Error):
a = int(input())
s =input()
if a >=3200:
  print(S)
else:
  print("red")


Fixed submission:
a = int(input())
s = input()
print(s if a >= 3200 else 'red')

Buggy python submission (verdict: Runtime Error):
if a >= 3200:
  print(s)
else:
  print("red")

Fixed submission:
a = int(input())
s = input()
print(s if a >= 3200 else 'red')
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [int(i) for i in input().split()]
s == 0
for i in a:
  s += 1/i
print(1/s)


Fixed submission:
n = int(input())
a = [int(i) for i in input().split()]
s = 0
for j in a:
  s += 1/j
print(1/s)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = [list(input()) for i in range(n)]
l = ["".join(sorted(i)) for i in l]
l = [i for i in l if i != 1]
l.sort()
s = 0
for i in range(len(l)-1):
  for j in range(i+1,len(l)):
    if l[i] == l[j]:
      s += 1
    else:
      break
print(s)


Fixed submission:
import collections
n = int(input())
s = ["".join(sorted(input())) for i in range(n)]
l = collections.Counter(s)
ans = sum(i*(i-1)//2 for i in l.values())
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = [list(input()) for i in range(n)]
l = ["".join(sorted(i)) for i in l]
l = [i for i in l if i != 1]
l.sort()
s = 0
for i in range(len(l)-1):
  for j in range(i+1,len(l)):
    if l[i] == l[j]:
      s += 1
    else:
      break
print(s)


Fixed submission:
import collections
n = int(input())
s = ["".join(sorted(input())) for i in range(n)]
l = collections.Counter(s)
ans = sum(i*(i-1)//2 for i in l.values())
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = [list(input()) for i in range(n)]
l = ["".join(sorted(i)) for i in l]
l = [i for i in l if i != 1]
s = 0
for i in range(len(l)-1):
  for j in range(i+1,len(l)):
    if l[i] == l[j]:
      s += 1
print(s)


Fixed submission:
import collections
n = int(input())
s = ["".join(sorted(input())) for i in range(n)]
l = collections.Counter(s)
ans = sum(i*(i-1)//2 for i in l.values())
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = [list(input()) for i in range(n)]
l = ["".join(sorted(i)) for i in l]
l = [i for i in l if i != 1]
l.sort()
s = 0
for i in range(len(l)-1):
  for j in range(i+1,len(l)):
    if l[i] == l[j]:
      s += 1
print(s)


Fixed submission:
import collections
n = int(input())
s = ["".join(sorted(input())) for i in range(n)]
l = collections.Counter(s)
ans = sum(i*(i-1)//2 for i in l.values())
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = [list(input()) for i in range(n)]
l = ["".join(sorted(i)) for i in l]
l.sort()
s = 0
for i in range(n-1):
  for j in range(i+1,n):
    if l[i] == l[j]:
      s += 1
print(s)


Fixed submission:
import collections
n = int(input())
s = ["".join(sorted(input())) for i in range(n)]
l = collections.Counter(s)
ans = sum(i*(i-1)//2 for i in l.values())
print(ans)