Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
n,k = map(int,input().split())
mx = 100000
dp = [[k+1 for _ in range(mx+1)]for _ in range(n+1)]
dp[0][0]=0
for i in range(1,n+1):
    dp[i][0]= 0
    w,v = map(int,input().split())
    for j in range(v):
        dp[i][j]= dp[i-1][j]
    for j in range(v,mx+1):
        next = w+dp[i-1][j-v]
        if next<=k:
            dp[i][j]= min(next,dp[i-1][j])
        else:
            dp[i][j]=dp[i-1][j]
for i in range(mx,-1,-1):
    if dp[n][i]<=k:
        print(i)
        break


Fixed submission:
n,k = map(int,input().split())
mx = 100000
dp = [[k+1 for _ in range(mx+1)]for _ in range(n+1)]
dp[0][0]=0
for i in range(1,n+1):
    dp[i][0]= 0
    w,v = map(int,input().split())
    for j in range(v):
        dp[i][j]= dp[i-1][j]
    for j in range(v,mx+1):
        next = w+dp[i-1][j-v]
        if next<=k:
            dp[i][j]= min(next,dp[i-1][j])
        else:
            dp[i][j]=dp[i-1][j]
for i in range(mx,-1,-1):
    if dp[n][i]<=k:
        print(i)
        break

Buggy python submission (verdict: Time Limit Exceeded):
import sys
sys.setrecursionlimit(10000000)
n,k= map(int,input().split())
mxScore = set()
items= []
for i in range(n):
    w,v = map(int,input().split())
    items.append([w,v])
def factory(item,weight,value):
    if item==n or weight==k:
        mxScore.add(value)
    else:
        w, v = items[item]
        factory(item + 1,weight, value)
        if weight+w<=k:
            factory(item+1,weight+w,value+v)
factory(0,0,0)
print(max(mxScore))

Fixed submission:
n,k = map(int,input().split())
mx = 100000
dp = [[k+1 for _ in range(mx+1)]for _ in range(n+1)]
dp[0][0]=0
for i in range(1,n+1):
    dp[i][0]= 0
    w,v = map(int,input().split())
    for j in range(v):
        dp[i][j]= dp[i-1][j]
    for j in range(v,mx+1):
        next = w+dp[i-1][j-v]
        if next<=k:
            dp[i][j]= min(next,dp[i-1][j])
        else:
            dp[i][j]=dp[i-1][j]
for i in range(mx,-1,-1):
    if dp[n][i]<=k:
        print(i)
        break

Buggy python submission (verdict: Time Limit Exceeded):
import sys
sys.setrecursionlimit(10000000)
n,k= map(int,input().split())
mxScore = set()
items= []
for i in range(n):
    w,v = map(int,input().split())
    items.append([w,v])
def factory(item,weight,value):
    if item==n:
        mxScore.add(value)
    else:
        w, v = items[item]
        factory(item + 1,weight, value)
        if weight+w<=k:
            factory(item+1,weight+w,value+v)
factory(0,0,0)
print(max(mxScore))

Fixed submission:
n,k = map(int,input().split())
mx = 100000
dp = [[k+1 for _ in range(mx+1)]for _ in range(n+1)]
dp[0][0]=0
for i in range(1,n+1):
    dp[i][0]= 0
    w,v = map(int,input().split())
    for j in range(v):
        dp[i][j]= dp[i-1][j]
    for j in range(v,mx+1):
        next = w+dp[i-1][j-v]
        if next<=k:
            dp[i][j]= min(next,dp[i-1][j])
        else:
            dp[i][j]=dp[i-1][j]
for i in range(mx,-1,-1):
    if dp[n][i]<=k:
        print(i)
        break
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = list(map(int,input().split()))
dp = [[0 for _ in range(n)] for _ in range(n)]
for i in range(n):
    if n%2 ==0:
        dp[i][i]=-s[i]
        turn =0
    else:
        dp[i][i]=s[i]
        turn = 1
def findMax(i,j):
    dp[i][j] = max(dp[i+1][j]+s[i],dp[i][j-1]+s[j])
def findMin(i,j):
    dp[i][j]= min(dp[i+1][j]-s[i],dp[i][j-1]-s[j])
for length in range(2,n+1):
    for j in range(n-length+1):
        if not turn:
            findMax(j,j+length-1)
        else:
            findMin(j,j+length-1)
    turn^=1

print(dp[0][n-1])



Fixed submission:
n = int(input())
s = list(map(int,input().split()))
dp = [[0 for _ in range(n)] for _ in range(n)]
for i in range(n):
    if n%2 ==0:
        dp[i][i]=-s[i]
        turn =0
    else:
        dp[i][i]=s[i]
        turn = 1
def findMax(i,j):
    dp[i][j] = max(dp[i+1][j]+s[i],dp[i][j-1]+s[j])
def findMin(i,j):
    dp[i][j]= min(dp[i+1][j]-s[i],dp[i][j-1]-s[j])
for length in range(2,n+1):
    for j in range(n-length+1):
        if not turn:
            findMax(j,j+length-1)
        else:
            findMin(j,j+length-1)
    turn^=1

print(dp[0][n-1])
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = list(map(int,input().split()))
dp = [[0 for _ in range(n)] for _ in range(n)]
psum = [0 for _ in range(n+1)]
sm = 0
for i in range(n):
    sm +=s[i]
    psum[i+1]=sm
def findMin(left,right):
    dp[left][right]=dp[left][left]+dp[left+1][right]+psum[right+1]-psum[left]
    for i in range(left+1,right):
        dp[left][right] = min(dp[left][right],dp[left][i]+dp[i+1][right]+psum[right+1]-psum[left])
for length in range(2,n+1):
    for l in range(n-length+1):
        r = l+length-1
        findMin(l,r)

print(dp[0][n-1])

Fixed submission:
n = int(input())
s = list(map(int,input().split()))
dp = [[0 for _ in range(n)] for _ in range(n)]
psum = [0 for _ in range(n+1)]
sm = 0
for i in range(n):
    sm +=s[i]
    psum[i+1]=sm
def findMin(left,right):
    dp[left][right]=dp[left][left]+dp[left+1][right]+psum[right+1]-psum[left]
    for i in range(left+1,right):
        dp[left][right] = min(dp[left][right],dp[left][i]+dp[i+1][right]+psum[right+1]-psum[left])
for length in range(2,n+1):
    for l in range(n-length+1):
        r = l+length-1
        findMin(l,r)

print(dp[0][n-1])
Buggy python submission (verdict: Time Limit Exceeded):
a, b = map(int, input().split())
i = 1
common = []
while True:
    if a % i == 0 and b % i == 0:
        a //= i
        b //= i
        common.append(i)
    if min(a, b) < i:
        break
    i += 1

count = 1
for i in range(1, len(common)):
    for j in range(1, i):
        if common[i] % common[j] == 0:
            break
    else:
        count += 1
print(count)


Fixed submission:
import fractions
import math
a, b = map(int, input().split())
greatest = fractions.gcd(a, b)

factor = [1]
max_iter = int(math.sqrt(greatest)) + 1
for i in range(2, max_iter):
    while greatest % i == 0:
        greatest //= i
        factor.append(i)
if greatest != 1:
    factor.append(greatest)
factor = set(factor)
print(len(factor))

Buggy python submission (verdict: Time Limit Exceeded):
a, b = map(int, input().split())
common = []
for i in range(1, min(a, b) + 1):
    if a % i == 0 and b % i == 0:
        common.append(i)

count = 1
for i in range(1, len(common)):
    for j in range(1, i):
        if common[i] % common[j] == 0:
            break
    else:
        count += 1
print(count)


Fixed submission:
import fractions
import math
a, b = map(int, input().split())
greatest = fractions.gcd(a, b)

factor = [1]
max_iter = int(math.sqrt(greatest)) + 1
for i in range(2, max_iter):
    while greatest % i == 0:
        greatest //= i
        factor.append(i)
if greatest != 1:
    factor.append(greatest)
factor = set(factor)
print(len(factor))

Buggy python submission (verdict: Time Limit Exceeded):
a, b = map(int, input().split())
common = []
for i in range(1, min(a, b) + 1):
    if a % i == 0 and b % i == 0:
        common.append(i)

count = 1
for i in range(1, len(common)):
    for j in range(2, common[i]):
        if common[i] % j == 0:
            break
    else:
        count += 1
print(count)


Fixed submission:
import fractions
import math
a, b = map(int, input().split())
greatest = fractions.gcd(a, b)

factor = [1]
max_iter = int(math.sqrt(greatest)) + 1
for i in range(2, max_iter):
    while greatest % i == 0:
        greatest //= i
        factor.append(i)
if greatest != 1:
    factor.append(greatest)
factor = set(factor)
print(len(factor))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
h = list(map(int, input().split()))

max_step = 0
for i in range(n):
    current_step = 0
    for j in range(i + 1, n):
        if h[j - 1] >= h[j]:
            current_step += 1
            if current_step > max_step:
                max_step = current_step
        else:
            i = j
            break
print(max_step)


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

max_step = 0
current_step = 0
for i in range(n - 1):
    if h[i] >= h[i + 1]:
        current_step += 1
        if current_step > max_step:
            max_step = current_step
    else:
        current_step = 0
print(max_step)

Buggy python submission (verdict: Runtime Error):
for i in range(n):
    current_step = 0
    for j in range(i + 1, n):
        if h[j - 1] >= h[j]:
            current_step += 1
            if current_step > max_step:
                max_step = current_step
        else:
            i = j
            break
print(max_step)


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

max_step = 0
current_step = 0
for i in range(n - 1):
    if h[i] >= h[i + 1]:
        current_step += 1
        if current_step > max_step:
            max_step = current_step
    else:
        current_step = 0
print(max_step)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = []
for i in range(n):
    a.append(int(input()))
for i in range(n):
    removed = a[:i] + a[i + 1:]
    print(max(removed))

Fixed submission:
n = int(input())
a = []
for i in range(n):
    a.append(int(input()))

global_max = max(a)
count = 0
for i in range(n):
    if a[i] == global_max:
        count += 1
    if count == 2:
        break

for i in range(n):
    if a[i] == global_max:
        if count == 1:
            print(max(a[:i] + a[i + 1:]))
        else:
            print(global_max)
    else:
        print(global_max)
Buggy python submission (verdict: Time Limit Exceeded):
l, r = map(int, input().split())
x = []
for i in range(l, r):
    for j in range(i + 1, r + 1):
        mod = i * j % 2019
        x.append(mod)
print(min(x))


Fixed submission:
l, r = map(int, input().split())
x = []
for i in range(l, r):
    for j in range(i + 1, r + 1):
        mod = i * j % 2019
        x.append(mod)
        if mod == 0:
            print(0)
            exit()
print(min(x))
Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())
vote = n * [0]
for i in range(m):
    l, r = map(int, input().split())
    for j in range(l - 1, r):
        vote[j] += 1
print(vote.count(m))


Fixed submission:
n, m = map(int, input().split())
max_value = 10 ** 5
min_value = 1
for i in range(m):
    l, r = map(int, input().split())
    min_value = max(min_value, l)
    max_value = min(max_value, r)

ans = max_value - min_value + 1
if ans < 0:
    ans = 0
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
s = input()
n = len(s)
i = 0
while True:
    before = len(s)
    s = s.replace('01', '').replace('10', '')
    after = len(s)
    if before == after:
        break
print(n - len(s))


Fixed submission:
s = input()
n0 = s.count('0')
n1 = s.count('1')
print(2 * min(n0, n1))

Buggy python submission (verdict: Time Limit Exceeded):
s = input()
n = len(s)
i = 0
while i < len(s) - 1:
    if s[i] != s[i + 1]:
        s = s[:i] + s[i + 2:]
        i = 0
    else:
        i += 1
print(n - len(s))


Fixed submission:
s = input()
n0 = s.count('0')
n1 = s.count('1')
print(2 * min(n0, n1))
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
n = int(input())

status = np.zeros((n + 1, 3), dtype=np.int)
for i in range(n):
    status[i + 1, :] = list(map(int, input().split()))

diffs = np.diff(status, axis=0)
answer = 'Yes'
for i in range(n):
    sum_step = np.sum(diffs[i, 1:])
    time = diffs[i, 0]
    if sum_step > time or sum_step % 2 != time % 2:
        answer = 'No'
        break
print(answer)

Fixed submission:
import numpy as np
n = int(input())

status = np.zeros((n + 1, 3), dtype=np.int)
for i in range(n):
    status[i + 1, :] = list(map(int, input().split()))

diff = np.diff(status, axis=0)
time = diff[:, 0]
step = np.sum(diff[:, 1:], axis=1)

if all(step <= time) and all(step % 2 == time % 2):
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
n, y = map(int, input().split())
b = [-1, -1, -1]
count = 0
for i in range(n + 1):
  for j in range(n + 1):
    k = n - i - j
    if k < 0:
      break
    total = 10000 * i + 5000 * j + 1000 * k
    count += 1
    if total == y and (i + j + k) == n:
      b = [i, j, k]
      break
print(b)

Fixed submission:
s = input()
print('2018' + s[4:])
Buggy python submission (verdict: Runtime Error):
a, b, k = map(int, input())
c = min(a,k)
a -= c
k -= c
b -= min(b, k)
print(a, b)

Fixed submission:
a, b = input().split()
print(b + a)
Buggy python submission (verdict: Runtime Error):
a, b, k = map(int, input())
c = min(a,k)
a -= c
k -= c
b -= min(b, k)
print(a, b)

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

Fixed submission:
s = input()
cnt = 0
for i in range((len(s)+1)//2):
  if s[i] != s[-i-1]:
    cnt += 1
print(cnt)
Buggy python submission (verdict: Runtime Error):
days = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
day = input()
i = 7 - days.indexOf(day)
print(i)

Fixed submission:
days = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
day = input()
print(7 - days.index(day))
Buggy python submission (verdict: Runtime Error):
in_list = input().split()
A, B, K = int(in_list[0]), int(in_list[1]), int(in_list[2])

for k in range(K):
  if A > 0:
    A -= 1
  elif B > 0:
    B -= 1
  elif:
    pass

print(A, B)


Fixed submission:
a = input().split()
print(a[1]+a[0])
Buggy python submission (verdict: Runtime Error):
import math

X = int(input())
x = round(math.sqrt(X), 0)
flag = 0

for i in range(100):
    for j in range(2, x):
        if X % j == 0:
            flag = 1
            break
    if flag == 0:
        break
    else:
        flag = 0
        X += 1
print(X)

Fixed submission:
import math

X = int(input())
x = int(round(math.sqrt(X), 0))
flag = 0

for i in range(100):
    for j in range(2, x):
        if X % j == 0:
            flag = 1
            break
    if flag == 0:
        break
    else:
        flag = 0
        X += 1
print(X)

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

X = int(input())
x = round(math.sqrt(X), 0)
flag = 0

for i in range(100):
  for j in range(2, x):
    if X % j == 0:
      flag = 1
      break
  if flag == 0:
    break
  else:
    flag = 0
	X += 1

print(X)

Fixed submission:
import math

X = int(input())
x = int(round(math.sqrt(X), 0))
flag = 0

for i in range(100):
    for j in range(2, x):
        if X % j == 0:
            flag = 1
            break
    if flag == 0:
        break
    else:
        flag = 0
        X += 1
print(X)
Buggy python submission (verdict: Time Limit Exceeded):
A, B = map(int, input().split())
a , b = 0, 0
ans = 0

for i in range(1, 100000):
  a = A * i
  if ans != 0:
    print(ans)
    break
  for j in range(1, 100000):
    b = B * j
    if a == b:
      ans = a
    elif b < a:
      continue
    else:
      break

Fixed submission:
A, B = map(int, input().split())
a , c = 0, 0
ans = 0

if B > A:
  c = B
  B = A
  A = c
 
for i in range(1, B+1):
  a = A * i
  if ans != 0:
    break
  if a % B == 0:
    ans = a
    break
print(ans)
Buggy python submission (verdict: Runtime Error):
first, second = [input().split()]
print(second+first)

Fixed submission:
first, second = input().split()
print(second+first)
Buggy python submission (verdict: Runtime Error):
takahashi, aoki, kaisu = [int(x) for x in input().split()]
taka_amari = takahashi - kaisu
if taka_amari<0:
    ao_amari = aoki+taka_amari

if taka_amari<0:
    taka_amari = 0
if ao_amari<0:
    ao_amari = 0
print(str(taka_amari) + " " + str(ao_amari))

Fixed submission:
takahashi, aoki, kaisu = [int(x) for x in input().split()]
taka_amari = takahashi - kaisu
ao_amari = aoki
if taka_amari<0:
    ao_amari = aoki+taka_amari
 
if taka_amari<0:
    taka_amari = 0
if ao_amari<0:
    ao_amari = 0
print(str(taka_amari) + " " + str(ao_amari))

Buggy python submission (verdict: Time Limit Exceeded):
takahashi, aoki, kaisu = [int(x) for x in input().split()]
for i in range(kaisu):
    if(takahashi>0):
        takahashi = takahashi - 1
    elif(aoki>0):
        aoki = aoki-1
print(str(takahashi) + " " + str(aoki))

Fixed submission:
takahashi, aoki, kaisu = [int(x) for x in input().split()]
taka_amari = takahashi - kaisu
ao_amari = aoki
if taka_amari<0:
    ao_amari = aoki+taka_amari
 
if taka_amari<0:
    taka_amari = 0
if ao_amari<0:
    ao_amari = 0
print(str(taka_amari) + " " + str(ao_amari))
Buggy python submission (verdict: Runtime Error):
import math
target = input()
def is_prime(n):
    for i in range(2, int(math.sqrt(n)) + 1):
        if n%i ==0:
            return False
    return True

not_found_flg = True
if target %2 == 0:
    target = target+1
result = 0
while not_found_flg:
    if (is_prime(target)):
        result = target
        break
    target = target+2

print(result)

Fixed submission:
import math
def is_prime(n):
    for i in range(2, int(math.sqrt(n)) + 1):
        if n%i ==0:
            return False
    return True
 
target = int(input())
 
not_found_flg = True
if target == 2:
    print("2")
else:
    if target %2 == 0:
        target = target+1
    result = 0

    while not_found_flg:
        if (is_prime(target)):
            result = target
            break
        target = target+2
 
    print(result)
Buggy python submission (verdict: Runtime Error):
a,b = input().split()
if (a<=9 and b<=9):
  print(a*b)
else:
  print(-1)

Fixed submission:
a, b = map(int, input().split())
if (a<=9 and b<=9):
  print(a*b)
else:
  print(-1)
Buggy python submission (verdict: Time Limit Exceeded):
import copy
length = int(input())
suretsu=[int(input()) for i in range(length)]
result = []
zantei_max = max(suretsu)
for i in range(length):
    if (zantei_max == suretsu[i]):
        copy_suretsu = copy.deepcopy(suretsu)
        del copy_suretsu[i]
        new_max = max(copy_suretsu)
        result.append(str(new_max))
    else:
        result.append(str(zantei_max))
print('\n'.join(result))

Fixed submission:
length = int(input())
suretsu=[int(input()) for i in range(length)]
result = []
sorted_suretsu = sorted(suretsu,reverse=True)
zantei_max = sorted_suretsu[0]

for i in range(length):
    if (zantei_max == suretsu[i]):
        result.append(str(sorted_suretsu[1]))
    else:
        result.append(str(zantei_max))
print('\n'.join(result))

Buggy python submission (verdict: Time Limit Exceeded):
length = int(input())
suretsu=[int(input()) for i in range(length)]
result = []
for i in range(length):
    pop_suretsu = suretsu[0:i] + suretsu[i+1:]
    result.append(str(max(pop_suretsu)))
print('\n'.join(result))

Fixed submission:
length = int(input())
suretsu=[int(input()) for i in range(length)]
result = []
sorted_suretsu = sorted(suretsu,reverse=True)
zantei_max = sorted_suretsu[0]

for i in range(length):
    if (zantei_max == suretsu[i]):
        result.append(str(sorted_suretsu[1]))
    else:
        result.append(str(zantei_max))
print('\n'.join(result))
Buggy python submission (verdict: Runtime Error):
num = input()
evens = [int(x) for x  in input().split()]

itr = 0
flg = True
while flg:
  evens = list(map(lambda x: (x/2), evens))
  is_evens = list(map(lambda x: x.is_integer(), evens))
  if not all(is_evens):
    flg = False
    break
  itr+=1
  print(evens)
print(itr)

Fixed submission:
num = input()
print(num.count('1'))
Buggy python submission (verdict: Runtime Error):
s = input()

flag = True
for i in range(len(s)):
  if i % 2 == 0:
    if s[i] not in ['R', 'U', 'D']:
      flag = False
      break
  else:
    if s[i] not in ['L', 'U', 'D']:
      flag = False
      break
  
result = 'Yes' if flag else 'No'
print(result)
v

Fixed submission:
s = input()

flag = True
for i in range(len(s)):
  if i % 2 == 0:
    if s[i] not in ['R', 'U', 'D']:
      flag = False
      break
  else:
    if s[i] not in ['L', 'U', 'D']:
      flag = False
      break
  
result = 'Yes' if flag else 'No'
print(result)
Buggy python submission (verdict: Runtime Error):
n = int(input())
s = input()
k = int(input())

s = list(map(lambda x: '*' if x != s[k] else x, s))

print(*s, sep='')


Fixed submission:
n = int(input())
s = input()
k = int(input()) - 1

s = list(map(lambda x: '*' if x != s[k] else x, s))

print(*s, sep='')
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

A = [0 for i in range(N)]
B = [0 for i in range(N)]
C = [0 for i in range(N)]

for i in range(N):
  A[i], B[i] = [int(j) for j in input().split()]
  C[i] = A[i] + B[i]

diff = 0

while len(A) > 0:
  index = C.index(max(C))
  diff += A[index]
  A.pop(index)
  B.pop(index)
  C.pop(index)

  if len(A) == 0:
    break

  index = C.index(max(C))
  diff -= B[index]
  A.pop(index)
  B.pop(index)
  C.pop(index)

print(diff)


Fixed submission:
N = int(input())

A = [[] for i in range(N)]

for i in range(N):
  a, b = [int(j) for j in input().split()]
  c = a + b
  A[i] = [a, b, c]

A.sort(key=lambda x: x[2], reverse=True)

diff = 0

for i in range(N):
  if i % 2 == 0:
    diff += A[i][0]
  else:
    diff -= A[i][1]

print(diff)
Buggy python submission (verdict: Runtime Error):
a = map(int, input().split())
print(max(a) - min(a))


Fixed submission:
a = list(map(int, input().split()))
print(max(a) - min(a))
Buggy python submission (verdict: Runtime Error):
o = input()
e = input()

n = len(o)
for i in range(n):
  print(o[i] + e[i], end='')


Fixed submission:
o = list(input())
e = list(input()) + ['']

n = len(o)
for x, y in zip(o, e):
  print(x + y, end='')
Buggy python submission (verdict: Runtime Error):
x=int(input())
l=[]
s=x
for x in map(int,input().split()):
    l.append(x)
z=0
suml=0
h=[]
while(z<s-1):
    if(l[z]>=l[z+1]):
        suml+=1
    elif(l[z]>=l[z+1]):
        suml+=1
    else:
        h.append(suml)
        suml=0    
    z+=1
    if(z==s-1):
        h.append(suml)
print(max(h))        



Fixed submission:
x=int(input())
l=[]
s=x
for x in map(int,input().split()):
    l.append(x)
if(s==1):
    print(0)
    exit()    
z=0
suml=0
h=[]
while(z<s-1):
    if(l[z]>=l[z+1]):
        suml+=1
    elif(l[z]>=l[z+1]):
        suml+=1
    else:
        h.append(suml)
        suml=0    
    z+=1
    if(z==s-1):
        h.append(suml)
print(max(h))

Buggy python submission (verdict: Runtime Error):
x=int(input())
l=[]
for x in map(int,input().split()):
    l.append(x)
z=len(l)-1
suml=0
h=[]
while(z>0):
    if(z==len(l)-1):
        h.append(0)
        if(l[z]<=l[z-1]):
            suml+=1
    elif(l[z]<=l[z-1]):
        suml+=1
    else:
        h.append(suml)
        suml=0
    z-=1
print(max(h))        



Fixed submission:
x=int(input())
l=[]
s=x
for x in map(int,input().split()):
    l.append(x)
if(s==1):
    print(0)
    exit()    
z=0
suml=0
h=[]
while(z<s-1):
    if(l[z]>=l[z+1]):
        suml+=1
    elif(l[z]>=l[z+1]):
        suml+=1
    else:
        h.append(suml)
        suml=0    
    z+=1
    if(z==s-1):
        h.append(suml)
print(max(h))
Buggy python submission (verdict: Runtime Error):
n=input()
s, t=str(input()).split()
for i in range(n):
  print(list(s)[i], list(t)[i], sep='', end='')


Fixed submission:
n=input()
s, t=str(input()).split()
for i in range(int(n)):
  print(list(s)[i], list(t)[i], sep='', end='')

Buggy python submission (verdict: Runtime Error):
n=input()
s=input()
t=input()
for i in range(n):
  print(list(s)[i], list(t)[i], sep='', end='')


Fixed submission:
n=input()
s, t=str(input()).split()
for i in range(int(n)):
  print(list(s)[i], list(t)[i], sep='', end='')
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

def saisyou(x, y):
    ans =  (x * y) // gcd(x, y)
    print(ans)

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