Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
def main() -> None:
    H, N = rmi()
    AB = []
    for _ in range(N):
        AB.append(rmi())
    dp = [10 ** 9] * (H + 1)
    dp[0] = 0
    for damage, mp in AB:
        for i in range(len(dp)):
            prev = max(i - damage, 0)
            dp[i] = min(dp[i], dp[prev] + mp)
    w(dp[H])


def r() -> str:
    return input().strip()


def ri() -> int:
    return int(r())


def rmi(delim: str = ' ') -> tuple:
    return tuple(map(int, input().split(delim)))


def w(data) -> None:
    print(data)


def wm(*data, delim: str = ' ') -> None:
    print(delim.join(map(str, data)))


if __name__ == '__main__':
    main()


Fixed submission:
def main() -> None:
    H, N = rmi()
    AB = []
    for _ in range(N):
        AB.append(rmi())
    dp = [10 ** 9] * (H + 1)
    dp[0] = 0
    for damage, mp in AB:
        for i in range(len(dp)):
            prev = max(i - damage, 0)
            dp[i] = min(dp[i], dp[prev] + mp)
    w(dp[H])


def r() -> str:
    return input().strip()


def ri() -> int:
    return int(r())


def rmi(delim: str = ' ') -> tuple:
    return tuple(map(int, input().split(delim)))


def w(data) -> None:
    print(data)


def wm(*data, delim: str = ' ') -> None:
    print(delim.join(map(str, data)))


if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3


def main() -> None:
    H, N = rmi()
    AB = []
    for _ in range(N):
        AB.append(rmi())
    dp = [10 ** 9] * (H + 1)
    dp[0] = 0
    for damage, mp in AB:
        for i in range(len(dp)):
            prev = max(i - damage, 0)
            dp[i] = min(dp[i], dp[prev] + mp)
    w(dp[H])


def r() -> str:
    return input().strip()


def ri() -> int:
    return int(r())


def rmi(delim: str = ' ') -> tuple:
    return tuple(map(int, input().split(delim)))


def w(data) -> None:
    print(data)


def wm(*data, delim: str = ' ') -> None:
    print(delim.join(map(str, data)))


if __name__ == '__main__':
    import sys
    sys.setrecursionlimit(10 ** 9)
    main()


Fixed submission:
def main() -> None:
    H, N = rmi()
    AB = []
    for _ in range(N):
        AB.append(rmi())
    dp = [10 ** 9] * (H + 1)
    dp[0] = 0
    for damage, mp in AB:
        for i in range(len(dp)):
            prev = max(i - damage, 0)
            dp[i] = min(dp[i], dp[prev] + mp)
    w(dp[H])


def r() -> str:
    return input().strip()


def ri() -> int:
    return int(r())


def rmi(delim: str = ' ') -> tuple:
    return tuple(map(int, input().split(delim)))


def w(data) -> None:
    print(data)


def wm(*data, delim: str = ' ') -> None:
    print(delim.join(map(str, data)))


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
min_b = max(-1000000, x - (k - 1) )
max_b = min(1000000, x + (k - 1) )
ans = []
for i in range(min_b, max_b + 1):
  ans.append(str(i))
print(" ".join(ans))

Fixed submission:
k, x = [int(v) for v in input().split()]

min_b = max(-1000000, x - (k - 1) )
max_b = min(1000000, x + (k - 1) )
ans = []
for i in range(min_b, max_b + 1):
  ans.append(str(i))
print(" ".join(ans))
Buggy python submission (verdict: Runtime Error):
​
n, k = [int(v) for v in input().split()]
​
c = (n - 1) * (n - 2) // 2
#print("c=", c)
m = 0
if k > c:
  print(-1)
else:
  m_max = n - 1 + (c - k)
  print(m_max)
  for i in range(1, n + 1):
    for j in range(i + 1, n + 1):
      if m < m_max:
        print(i, j)
        m += 1
      else:
        break

Fixed submission:
n, k = [int(v) for v in input().split()]

c = (n - 1) * (n - 2) // 2
#print("c=", c)
m = 0
if k > c:
  print(-1)
else:
  m_max = n - 1 + (c - k)
  print(m_max)
  for i in range(1, n + 1):
    for j in range(i + 1, n + 1):
      if m < m_max:
        print(i, j)
        m += 1
      else:
        break
Buggy python submission (verdict: Runtime Error):
n = int(input())
#print("n=",n)
xy_s = [[int(v) for v in input().split()] for _ in range(n)]
v = {}
for i in range(n):
  for j in range(n):
    if i == j:
      continue
    dx = xy_s[i][0] - xy_s[j][0]
    dy = xy_s[i][1] - xy_s[j][1]
    pq = (dx, dy)
    if pq in v:
      v[pq] += 1
    else:
      v[pq] = 1
    
    #v.append([xy_s[i][0] - xy_s[j][0] , xy_s[i][1] - xy_s[j][1]])
#print(v)
counts = v.values()
m = max(counts)
ans = n - m
#print("n={}, m={}, ans={}".format(n, m, ans))
print(ans)

Fixed submission:
n = int(input())

if n == 1:
  print(1)
else:
  #print("n=",n)
  xy_s = [[int(v) for v in input().split()] for _ in range(n)]
  v = {}
  for i in range(n):
    for j in range(n):
      if i == j:
        continue
      dx = xy_s[i][0] - xy_s[j][0]
      dy = xy_s[i][1] - xy_s[j][1]
      pq = (dx, dy)
      if pq in v:
        v[pq] += 1
      else:
        v[pq] = 1
    
      #v.append([xy_s[i][0] - xy_s[j][0] , xy_s[i][1] - xy_s[j][1]])
  #print(v)
  counts = v.values()
  m = max(counts)
  ans = n - m
  #print("n={}, m={}, ans={}".format(n, m, ans))
  print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
s = list(input())
count = 0
abc = 0
while True:
  for i in range(len(s)):
    #print(i, abc)
    if s[i] == 'A':
      abc = 1
    elif s[i] == 'B':
      if abc == 1:
        abc = 2
      else:
        abc = 0
    elif s[i] == 'C':
      if abc == 2:
        abc = 0
        count += 1
        s[i-2:i+1] = ['B', 'C', 'A']
        #print(s)
        #print(2)
        break        
  else:
    #print(1)
    break
    
print(count)

Fixed submission:
s = list(input())
count = 0
abc = 0

a_series = 0

for i in range(len(s)):
  #print(i, abc)
  if s[i] == 'A':
    if abc != 1:
      a_series = 0
    a_series += 1
    abc = 1
  elif s[i] == 'B':
    if abc == 1:
      abc = 2
    else:
      abc = 0
      a_series = 0
  elif s[i] == 'C':
    if abc == 2:
      abc = 1
      count += a_series
    else:
      abc = 0
      a_series = 0
      
print(count)
Buggy python submission (verdict: Runtime Error):
def equal(n, available):
  return n in available 

def less(n, available):
  return n < sorted(available)[0]

def greater(n, available):
  return n > sorted(available, reverse=True)[0]
  

#less(n, available) == True であること
def upper_next(n, available):  
  for v in sorted(available):
    if n < v:
      return v
  return 1/0

  
n_str, _ = [v for v in input().split()]
n_s = [0]
n_s.extend([int(n_str[i:i+1]) for i in range(len(n_str))])

d_s = [int(v) for v in input().split()]

available = set(list(range(10))) - set(d_s)

#print("n", n_s, "d", d_s, "u", available)

min_available = sorted(available)[0]
max_available = sorted(available, reverse=True)[0]

ans = [0]
ans.extend([min_available] * (len(n_s) - 1))

eq = True
for i in range(1, len(n_s)):
  if eq:
    if equal(n_s[i], available):
      ans[i] = n_s[i]
      continue
    else:
      eq = False
      if less(n_s[i], available):
        ans[i] = upper_next(n_s[i], available)
        #残りは最小値詰め
        break
      else:
        for j in range(i - 1, -1, -1):
          if ans[j] == max_available:
            ans[j] = min_available
          else:
            ans[j] = upper_next(ans[j], available)
            break
        break

begin = 0
if ans[0] == 0:
  begin = 1
ans_val = "".join(map(lambda x:str(x), ans[begin:]))

print(ans_val)

Fixed submission:
s = sorted([int(v) for v in input().split()])
if s == [5, 5, 7]:
  ans = "YES"
else: 
  ans = "NO"
print(ans)
Buggy python submission (verdict: Runtime Error):
def equal(n, available):
  return n in available 

def less(n, available):
  return n < sorted(available)[0]

def greater(n, available):
  return n > sorted(available, reverse=True)[0]
  

#less(n, available) == True であること
def upper_next(n, available):  
  for v in sorted(available):
    if n < v:
      return v
  return 1/0

  
n_str, _ = [v for v in input().split()]
n_s = [0]
n_s.extend([int(n_str[i:i+1]) for i in range(len(n_str))])

d_s = [int(v) for v in input().split()]

available = set(list(range(10))) - set(d_s)

#print("n", n_s, "d", d_s, "u", available)

min_available = sorted(available)[0]

ans = [0]
ans.extend([min_available] * (len(n_s) - 1))

eq = True
for i in range(1, len(n_s)):
  if eq:
    if equal(n_s[i], available):
      ans[i] = n_s[i]
      continue
    else:
      eq = False
      if less(n_s[i], available):
        ans[i] = upper_next(n_s[i], available)
        #残りは最小値詰め
        break
      else:
        for j in range(i - 1, -1, -1):
          if greater(ans[j], available):
            ans[j] = min_available
          else:
            ans[j] = upper_next(ans[j], available)
            break
        break

begin = 0
if ans[0] == 0:
  begin = 1
ans_val = "".join(map(lambda x:str(x), ans[begin:]))

print(ans_val)

Fixed submission:
def equal(n, available):
  return n in available 

def less(n, available):
  return n < sorted(available, reverse=True)[0]

def greater(n, available):
  return n > sorted(available, reverse=True)[0]
  

#less(n, available) == True であること
def upper_next(n, available):  
  for v in sorted(available):
    if n < v:
      return v
  return 1/0

  
n_str, _ = [v for v in input().split()]
n_s = [0]
n_s.extend([int(n_str[i:i+1]) for i in range(len(n_str))])
#print(n_s)
d_s = [int(v) for v in input().split()]

available = set(list(range(10))) - set(d_s)

#print("n", n_s, "d", d_s, "u", available)

min_available = sorted(available)[0]
max_available = sorted(available, reverse=True)[0]
#print(min_available, max_available)
ans = [0]
ans.extend([min_available] * (len(n_s) - 1))

eq = True
for i in range(1, len(n_s)):
  #print(ans)
  if eq:
    if equal(n_s[i], available):
      ans[i] = n_s[i]
      continue
    else:
      eq = False
      #print(n_s[i], available)
      if less(n_s[i], available):
        ans[i] = upper_next(n_s[i], available)
        #残りは最小値詰め
        break
      else:
        for j in range(i - 1, -1, -1):
          #print(ans)
          if ans[j] == max_available:
            ans[j] = min_available
          else:
            #print(ans)
            ans[j] = upper_next(ans[j], available)
            #print(ans)
            break
        break

#print(ans)
begin = 0
if ans[0] == 0:
  begin = 1
ans_val = "".join(map(lambda x:str(x), ans[begin:]))

print(ans_val)
Buggy python submission (verdict: Runtime Error):
N = input(int())
if (N%100)%10 == 3:
    print('bon')
elif (N%100)%10 == 0 or (N%100)%10 ==1 or (N%100)%10 ==6 or (N%100)%10 ==8:
    print('pon')
else:
    print('hon')



Fixed submission:
N = int(input())
if (N%100)%10 == 3:
    print('bon')
elif (N%100)%10 == 0 or (N%100)%10 ==1 or (N%100)%10 ==6 or (N%100)%10 ==8:
    print('pon')
else:
    print('hon')
Buggy python submission (verdict: Time Limit Exceeded):
f = int(input())
ls = [int(x) for x in input().split()]
a = c = max1 =0
for k in range(0, len(ls)-1):
    for a in range(k, f-1):
        if ls[a] < ls[a + 1]:
            break
        c = c + 1
    if c > max1:
        max1 = c
    c = 0
print(max1)

Fixed submission:
f = int(input())
ls = [int(x) for x in input().split()]
a = c = max1 = k =0
while k < len(ls)-1:
    for a in range(k, len(ls)-1):
        if ls[a] < ls[a + 1]:
            break
        c = c + 1
    if c > max1:
        max1 = c
    k = a + 1
    c = 0
print(max1)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
n = 0
for m in range(N - 1, 0, -1):
    n = n + m
print(n)


Fixed submission:
N = int(input())
print((N * (N - 1)) // 2)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
m = (N - 1)
n = 0
while m > 0:
    n = n + (m % N)
    N = m
    m = m - 1
print(n)


Fixed submission:
N = int(input())
print((N * (N - 1)) // 2)

Buggy python submission (verdict: Runtime Error):
N = int(input())
S = list(range(1, N + 1))
M = list(range(2, N + 1))
n = 0
for a in range(0, N - 1):
    n = n + (S[a] % M[a])
print(n)


Fixed submission:
N = int(input())
print((N * (N - 1)) // 2)
Buggy python submission (verdict: Runtime Error):
a,b,c,= [int(x) for x in input()]
n = c -(a-b)
if n > 0:
    print(n)
else:
    print(0)

Fixed submission:
a,b,c,= [int(x) for x in input().split()]
n = c -(a-b)
if n > 0:
    print(n)
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
A,B= [int(x) for x in input().split()]

if A <= 5:
    print(0)
elif 6<= a <= 12:
    print(int(B/2))
else:
    print(B)




Fixed submission:
A,B= [int(x) for x in input().split()]

if A <= 5:
    print(0)
elif 6<= A <= 12:
    print(int(B/2))
else:
    print(B)

Buggy python submission (verdict: Runtime Error):
A,B= [int(x) for x in input()]

if A <= 5:
    print(0)
elif 6<= a <= 12:
    print(int(B/2))
else:
    print(B)




Fixed submission:
A,B= [int(x) for x in input().split()]

if A <= 5:
    print(0)
elif 6<= A <= 12:
    print(int(B/2))
else:
    print(B)
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = [str(x) for x in input().split()]
K = int(input())
for a in range(N):
    if not S[a] == S[K - 1]:
        S[a] = '*'
print(''.join(S))

Fixed submission:
N = int(input())
S = [str(x) for x in input()]
K = int(input())
for a in range(N):
    if not S[a] == S[K - 1]:
        S[a] = '*'
print(''.join(S))
Buggy python submission (verdict: Runtime Error):
 n,m = map(int,input().split())
a = list(map(int, input().split()))
popular = list(filter(lambda e: e>=(1/(4*m))*sum(a),a))
print("Yes" if len(popular) >= m else "No")

Fixed submission:
n,m = map(int,input().split())
a = list(map(int, input().split()))
popular = list(filter(lambda e: e>=(1/(4*m))*sum(a),a))
print("Yes" if len(popular) >= m else "No")
Buggy python submission (verdict: Runtime Error):
S = str(input())
print('Yes' if S[2]==S[3] and S[4]==S[5] else 'No')

Fixed submission:
S = input()

if len(S)==3 and S.count('A')==2 or S.count('B')==2:
    print('Yes')

else:
    print('No')
Buggy python submission (verdict: Runtime Error):
a = n
print(a + a ** 2 + a ** 3)

Fixed submission:
a = int(input())
print (a + a **2 + a **3)
Buggy python submission (verdict: Time Limit Exceeded):
import math  
from functools import reduce

n = int(input())
count = 0

def gcd(*numbers):
    return reduce(math.gcd, numbers)

for i in range(1,n+1):
    for j in range(1,n+1):
        for k in range(1,n+1):
            m = gcd(i,j,k)
            count += m
print(count)   

Fixed submission:

import math

n = int(input())
count = 0

for i in range(1,n+1):
    for j in range(1,n+1):
        t = math.gcd(i,j)
        for k in range(1,n+1):
            m = math.gcd(t,k)
            count += m
print(count)

Buggy python submission (verdict: Runtime Error):
n = int(input())
count = 0

def gcd(*numbers):
    return reduce(math.gcd, numbers)

for i in range(1,n+1):
    for j in range(1,n+1):
        for k in range(1,n+1):
            m = gcd(i,j,k)
            count += m
print(count)   

Fixed submission:

import math

n = int(input())
count = 0

for i in range(1,n+1):
    for j in range(1,n+1):
        t = math.gcd(i,j)
        for k in range(1,n+1):
            m = math.gcd(t,k)
            count += m
print(count)
Buggy python submission (verdict: Runtime Error):
X,N = map(int,input().split())
lst = list(map(int,input().split()))
lst.sort()
if len(lst) == 0 :
    print(x)
    exit()
a = X
while a in lst :
    a += 1
b = X
while b in lst:
    b -= 1
if X-b > X-a :
    print(a)
else :
    print(b)

Fixed submission:
X, N = map(int, input().split())
lst = list(map(int, input().split()))
lst.sort()
if len(lst) == 0:
    print(X)
    exit()
A = X
while A in lst:
    A -= 1
B = X
while B in lst:
    B += 1
if X-A > B-X:
    print(B)
else:
    print(A)
Buggy python submission (verdict: Runtime Error):
n = int(input())
ls = list(map(int, input().split()))
res = 1
if 0 in ls:
    print(0)
    quit()
for x in ls:
    res *= x
    if res > 10**18:
        print(-1)
        quit()
print(res)

Fixed submission:
a,b = map(int,input().split())
c = a*b 
print(c)
Buggy python submission (verdict: Time Limit Exceeded):
A,B,C,K = map(int,input().split())
output = 0
m = 0
if B == 0 and C == 0 :
    print(A)
else :
    for i in range(A) :
        if m >= K :
            break
        output += 1
        m += 1
    for i in range(B) :
        if m >= K :
            break
        output += 0
        m+=1
    for i in range(C) :
        if m >= K :
            break
        output -= 1
        m+=1
    print(output)







Fixed submission:
A,B,C,K = map(int,input().split())
if K > A :
    M = K - A
    L = abs(M-B)
    print(A-L)
else :
    print(K)

Buggy python submission (verdict: Time Limit Exceeded):
A,B,C,K = map(int,input().split())
lst = []
m = 0
for i in range(A) :
    if m >= K :
        break
    lst.append(1)
    m += 1
for i in range(B) :
    if m >= K :
        break
    lst.append(0)
    m+=1
for i in range(C) :
    if m >= K :
        break
    lst.append(-1)
    m+=1
print(sum(lst))

Fixed submission:
A,B,C,K = map(int,input().split())
if K > A :
    M = K - A
    L = abs(M-B)
    print(A-L)
else :
    print(K)
Buggy python submission (verdict: Runtime Error):
n=int(input())
summ=0
for i in range(1,n):
    if i%3!=0 and i%5!=0:
        summ+=i
print(summ)n=int(input())
summ=0
for i in range(1,n):
    if i%3!=0 and i%5!=0:
        summ+=i
print(summ)


Fixed submission:
cnt=0
n=int(input())
for i in range(1,n+1):
    if i%3!=0 and i%5!=0:
        cnt+=i
print(cnt)
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
b=[0]*n
nsum=0
for i in range(n):
    b[a[i]]+=1
for k in range(n):
    nsum+=max(b[k]*(b[k]-1)//2,0)


for j in range(n):
    print((nsum+1-b[a[j]]))


Fixed submission:
n=int(input())
a=list(map(int,input().split()))
b=[0]*(n+1)
nsum=0
for i in range(n):
    b[a[i]]+=1
for k in range(n+1):
    nsum+=max(b[k]*(b[k]-1)//2,0)

for j in range(n):
    print((nsum+1-b[a[j]]))
Buggy python submission (verdict: Time Limit Exceeded):
N,K=map(int,input().split())
P=list(map(int,input().split()))
Kmax=-1
Ksum=0
for i in range(N-K+1):
    for j in range(K):
        Ksum+=P[i+j]
    if Ksum>Kmax:
        Kmax=Ksum
    Ksum=0
print((Kmax+K)/2)


Fixed submission:
N,K=map(int,input().split())
P=list(map(int,input().split()))
Q=[0]*(N+1)
Kmax=-1
for i in range(N):
    Q[i+1]+=P[i]+Q[i]

for j in range(N-K+1):
    if Q[j+K]-Q[j]>Kmax:
        Kmax=Q[j+K]-Q[j]
print((Kmax+K)/2)
Buggy python submission (verdict: Runtime Error):
A,B=map(int,input().split())
print(min(A-2*B),0)

Fixed submission:
A,B=map(int,input().split())
print(max(A-2*B,0))
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
s=list(map(int,input().split()))

j=-1
for i in range(1,len(s)):
    tmp=s[i]
    if s[i-1]>tmp:
        j=i
        while True:
            if s[j-1]>tmp and j>0:
                s[j]=s[j-1]
                j=j-1
            else:
                s[j]=tmp
                break
print(s[(n-1)//2+1]-s[(n-1)//2])


Fixed submission:
n=int(input())
s=list(map(int,input().split()))
s.sort()
print(s[(n-1)//2+1]-s[(n-1)//2])
Buggy python submission (verdict: Runtime Error):
A,B,C,D,E,F=map(int,input().split())
maxx=0
s=1
t=0
for i in range(F//(100*B)+1):
    for j in range((F-i*100*B)//(100*A)+1):
        for k in range(((i*B+j*A)*E)//D+1):
            for l in range (((i*B+j*A)*E-k*D)//C+1):
                if i==0 and j==0 and k==0 and l==0:
                    continue
                if (100*(i*B+j*A)+k*D+l*C)>F:
                    break
                elif (k*D+l*C)/(k*D+l*C+100*(i*B+j*A))>maxx:
                    maxx=(k*D+l*C)/(k*D+l*C+100*(i*B+j*A))
                    s=(k*D+l*C+100*(i*B+j*A))
                    t=k*D+l*C

print(s,t)


Fixed submission:
N=int(input())
A=int(input())
print(N*N-A)
Buggy python submission (verdict: Runtime Error):
a = str(input())
s = a + a**2 + a**3
print(s)

Fixed submission:
a = int(input())
n = a + a**2 + a**3
print(n)
Buggy python submission (verdict: Runtime Error):
x = list(map(int,input().stlip()))
for i in range(5):
  if x[i] == 0:
    print(i+1)


Fixed submission:
x = list(map(int,input().split()))
for i in range(5):
  if x[i] == 0:
    print(i+1)
Buggy python submission (verdict: Runtime Error):
X,N = list(map(int,input().split()))
p = list(map(int,input().split()))

def f(p):
  global X
  return p - X

p2 = list(map(f,p))

p3 = list(map(abs,p2))

OK = 2
j = 0


if min(p3) ==0:
  while(OK==2):
    j+=1
    OK = p3.count(min(p3)+j)
  if OK == 1:
    print(X-p2[p3.index(min(p3)+j)])
  else:
    print(X-j)
else:
  print(X)

Fixed submission:
X,N = list(map(int,input().split()))
if N != 0:
  p = list(map(int,input().split()))
else:
  p = [X+1]
def f(p):
  global X
  return p - X

p2 = list(map(f,p))

p3 = list(map(abs,p2))

OK = 2
j = 0


if min(p3) ==0:
  while(OK==2):
    j+=1
    OK = p3.count(min(p3)+j)
  if OK == 1:
    print(X-p2[p3.index(min(p3)+j)])
  else:
    print(X-j)
else:
  print(X)

Buggy python submission (verdict: Runtime Error):
X,N = list(map(int,input().split()))
p = list(map(int,input().split()))

def f(p):
  global X
  return p - X

p2 = list(map(f,p))

p3 = list(map(abs,p2))

OK = 2
j = 0
print(p2,p3)

if min(p3) ==0:
  while(OK==2):
    j+=1
    
    OK = p3.count(min(p3)+j)

  print(X-p2[p3.index(min(p3)+j)])
      
else:
  print(X)

Fixed submission:
X,N = list(map(int,input().split()))
if N != 0:
  p = list(map(int,input().split()))
else:
  p = [X+1]
def f(p):
  global X
  return p - X

p2 = list(map(f,p))

p3 = list(map(abs,p2))

OK = 2
j = 0


if min(p3) ==0:
  while(OK==2):
    j+=1
    OK = p3.count(min(p3)+j)
  if OK == 1:
    print(X-p2[p3.index(min(p3)+j)])
  else:
    print(X-j)
else:
  print(X)
Buggy python submission (verdict: Runtime Error):
A,B = int(input().split())
print(A*B)

Fixed submission:
A,B = input().split()
print(int(A)*int(B))
Buggy python submission (verdict: Runtime Error):
N = int(input())
N1 = N % 10
if N1 ==3:
  print('bon')
elif N1 == 0||N1==1||N1== 6||N1 == 8:
  print('pon')
else:
  print('hon')


Fixed submission:
N = int(input())
N1 = N % 10
if N1 ==3:
  print('bon')
elif N1 == 0 or N1==1 or N1== 6 or N1 == 8:
  print('pon')
else:
  print('hon')

Buggy python submission (verdict: Runtime Error):
N = int(input())
N1 = N % 10
if N1 ==3:
  print('bon')
elif N1 == 0,1,6,8:
  print('pon')
else:
  print('hon')


Fixed submission:
N = int(input())
N1 = N % 10
if N1 ==3:
  print('bon')
elif N1 == 0 or N1==1 or N1== 6 or N1 == 8:
  print('pon')
else:
  print('hon')
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = input()
S = A.replace(' ','a')
S = S + 'a'

for i in range(N):
  j = str(i+1) + 'a'
  k = S.count(j)
  print(k)



Fixed submission:
import math

R = int(input())
R = 2*R*math.pi

print(R)
Buggy python submission (verdict: Runtime Error):
N = int(input())
list = input().split()
for i in range(N):
  k = int(list[i])
  if k % 2 == 0:
    if k % 3 == 0 or k % 5 == 0:
        if k == int(list[N]):
          print("APPROVED")
    else:
      print("DENIED")
      break

Fixed submission:
N = int(input())
list = input().split()
on = 0
for i in range(N):
  k = int(list[i])
  if k % 2 == 0:
    if k % 3 == 0 or k % 5 == 0:
      on = 1 
    else:
      print("DENIED")
      break
  if i == N-1:
  	print("APPROVED")
Buggy python submission (verdict: Runtime Error):







a=input()
print(a**2)


Fixed submission:

a=int(input())
print(a**2)

Buggy python submission (verdict: Runtime Error):




a=









a=input()
print(a**2)

Fixed submission:

a=int(input())
print(a**2)
Buggy python submission (verdict: Runtime Error):
s = input()
n = len(s)
count = 0
for i in range(0, n, 2):
    if s[i] == 'R':
        count += 1
for i in range(1, n, 2):
    if s[i] == 'L':
        count += 1
if count == n:
    print("Yes")
else print("No")

Fixed submission:
s = input()
n = len(s)
for i in range(0, n, 2):
    if s[i] == 'L':
        print("No")
        exit()
for i in range(1, n, 2):
    if s[i] == 'R':
        print("No")
        exit()
print("Yes")
Buggy python submission (verdict: Runtime Error):
n = int(input())
h = list(map(int,input().split()))
a = []
for i in range(n-1):
    count = 0
    for j in range(i, n-1):
        if h[j] >= h[j+1]:
            count += 1
        else:
            break
    a.append(count)
print(max(a))

Fixed submission:
n = int(input())
h = list(map(int,input().split()))
c_max = 0
count = 0
for i in range(n-1):
    if h[i] >= h[i+1]:
        count += 1
    else:
        c_max = max(count, c_max)
        count = 0
print(max(c_max, count))