Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p03745 (python)

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

ans=0
def plus_minus(i):
    while True:
        if i==n-1:
            break
        if a[i]==a[i+1]:
            i+=1
            continue
        if a[i]<a[i+1]:
            return 1
        if a[i]>a[i+1]:
            return -1

check=plus_minus(0)            
ans=1
for j in range(n-1):
    if check==1:
        if a[j] <= a[j+1]:
            continue
        else:
            ans+=1
            check=plus_minus(j+1)
    else:
        if a[j]>=a[j+1]:
            continue
        else:
            ans+=1
            check=plus_minus(j+1)
print(ans)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=[int(i) for i in input().split()]

ans=0
def plus_minus(i):
    while True:
        if a[i]==a[i+1]:
            i+=1
            continue
        if a[i]<a[i+1]:
            return 1
        if a[i]>a[i+1]:
            return -1

check=plus_minus(0)            
ans=1
for j in range(n-1):
    if check==1:
        if a[j] <= a[j+1]:
            continue
        else:
            ans+=1
            check=plus_minus(j+1)
    else:
        if a[j]>=a[j+1]:
            continue
        else:
            ans+=1
            check=plus_minus(j+1)
print(ans)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=[int(i) for i in input().split()]

ans=0
def plus_minus(i):
    while True:
        if a[i]==a[i+1]:
            i+=1
            continue
        if a[i]<a[i+1]:
            return 1
        if a[i]>a[i+1]:
            return -1

check=plus_minus(0)            
ans=1
for j in range(i,n-1):
    if check==1:
        if a[j] <= a[j+1]:
            continue
        else:
            ans+=1
            check=plus_minus(j+1)
    else:
        if a[j]>=a[j+1]:
            continue
        else:
            ans+=1
            check=plus_minus(j+1)
print(ans)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=[int(i) for i in input().split()]

ans=0
def plus_minus(i):
    while True:
        if a[i]==a[i+1]:
            i+=1
            continue
        if a[i]<a[i+1]:
            return 1
        if a[i]>a[i+1]:
            return -1

plus_minus(0)            
ans=1
for j in range(i,n-1):
    if check==1:
        if a[j] <= a[j+1]:
            continue
        else:
            ans+=1
            check=plus_minus(j+1)
    else:
        if a[j]>=a[j+1]:
            continue
        else:
            ans+=1
            check=plus_minus(j+1)
print(ans)
Problem p03805 (python)

Fixed submission:
import itertools
n,m=map(int,input().split())
edge=[[]for i in range(n+1)]

for i in range(m):
    a,b=map(int,input().split())
    edge[a].append(b)
    edge[b].append(a)
    
ans=0
for i in itertools.permutations(range(1,n+1)):
    if i[0]!=1:
        continue
    for j in range(n-1):
        if i[j+1] not in edge[i[j]]:
            break
    else:
        ans+=1
print(ans)

Buggy submission (verdict: Runtime Error):
import itertools
n,m=map(int,input().split())
edge=[[]for i in range(m+1)]

for i in range(m):
    a,b=map(int,input().split())
    edge[a].append(b)
    edge[b].append(a)
    
ans=0
for i in itertools.permutations(range(1,n+1)):
    if i[0]!=1:
        continue
    for j in range(n-1):
        if i[j+1] not in edge[i[j]]:
            break
    else:
        ans+=1
print(ans)
Problem p02688 (python)

Fixed submission:
n, k = map(int, input().split())
l_n = [0] * n
for i in range(0, k):
    d = int(input())
    a = map(int, input().split())
    for l in a:
        l_n[l-1] = 1
print(l_n.count(0))

Buggy submission (verdict: Runtime Error):
n, k = int(input())
l_n = [0] * n
for i in range(0, k):
    d = int(input())
    a = int(input())
    for l in a:
        l_n[l-1] = 1
print(l_n.count(0))
Problem p02689 (python)

Fixed submission:
n, m = map(int, input().split())
h = list(map(int, input().split()))
l_n = [0] * n
for i in range(m):
    a, b = map(int, input().split())
    if h[a-1] == h[b-1]:
        l_n[a-1] = 1
        l_n[b-1] = 1
    elif h[a-1] > h[b-1]:
        l_n[b-1] = 1
    elif h[a-1] < h[b-1]:
        l_n[a-1] = 1
print(l_n.count(0))

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline

def main():
    x = int(input())
    for i in range(-1000, 1000):
        for j in range(-1000, 1000):
            if x == i**5 - j**5:
                print(i, j)
                break
        else:
            continue
        break

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
h = list(map(int, input().split()))
l_n = [True] * n
for i in range(m):
    a, b = map(int, input().split())
    elif h[a-1] >= h[b-1]:
        l_n[b-1] = False
    elif h[a-1] <= h[b-1]:
        l_n[a-1] = False
print(sum(l_n))

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
h = list(map(int, input().split()))
l_n = [True] * n
for i in range(m):
    a, b = map(int, input().split())
    elif h[a-False] >= h[b-False]:
        l_n[b-False] = False
    elif h[a-False] <= h[b-False]:
        l_n[a-False] = False
print(sum(l_n))
Problem p02933 (python)

Fixed submission:
a = int(raw_input())
s = raw_input()
if a < 3200:
    print('red')
else:
    print(s)

Buggy submission (verdict: Runtime Error):
n = int(raw_input())
a = map(int, raw_input().split())
b = 0.0
print(a)
for i in range(n):
    b = b + 1/float(a[i])
print(1/b)
Problem p02951 (python)

Fixed submission:
a, b, c = map(int, raw_input().split())
if (c-(a-b)) > 0:
    print(c-(a-b))
else:
    print(0)

Buggy submission (verdict: Runtime Error):
n = int(input())
h = [int(x) for x in input().split()]
h.reverse()
 
flag = True
 
for i in range(1, n):
    if h[i - 1] >= h[i]:
        continue
    elif h[i] == h[i - 1] + 1:
        h[i] -= 1
    else:
        flag = False
        break
 
print('Yes') if flag else print('No')

Buggy submission (verdict: Runtime Error):
n = raw_input()
arr = map(int, raw_input().split())

no_flag = False
length = len(arr)
tmp = arr
print(length)

if length > 1:
    for j in range(0, length-1):
        if arr[j+1] < arr[j]:
            tmp[j+1] = tmp[j+1]-1
        print(tmp)
        if tmp[j+1] < tmp[j]:
            no_flag = True
            break
    if no_flag == False:
        print("Yes")
    else:
        print("No")
else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
n = int(raw_input())
if n < 10:
    print(n)
elif n >= 10 and n < 100:
    print(9)
elif n >=100 and n < 1000:
    print((n-100) + 10)
elif n >=1000 and n < 10000:
    print(909)
elif n >= 10000 and n < 100000:
    print((n-10000) + 910)
elif n == 100000:
    print(90909)
Problem p02688 (python)

Fixed submission:
N, K = map(int, input().split())

have_snack = [0 for i in range(N)]

for k in range(K):
    hito_len = int(input())
    have_hito = list(map(int, input().split()))
    for hh in have_hito:
        have_snack[hh - 1] = 1

print(have_snack.count(0))

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())

have_snack = [0 for i in range(N)]

for k in range(K):
    hito_len = int(input())
    have_hito = map(int, input().split())
    for hh in range(have_hito):
        have_snack[hh - 1] = 1

print(have_snack.count(0))
Problem p02688 (python)

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

sunuke = []
ans = 0
for n in range(s[0]):
  sunuke.append(0)
for n in range(s[1]):
  d = input()
  a = list(map(int, input().split()))
  for n2 in a:
    sunuke[n2-1] += 1
for n in sunuke:
  if n == 0:
    ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
s = list(map(int, input().split()))

sunuke = []
ans = 0
for n in range(s[0]):
  sunuke.append(0)
for n in range(len(s)):
  d = input()
  a = list(map(int, input().split()))
  for n2 in a:
    sunuke[n2-1] += 1
for n in sunuke:
  if n == 0:
    ans += 1
print(ans)
Problem p02693 (python)

Fixed submission:
K=int(input())
a,b=map(int,input().split())
p=1
for i in range(a,b+1):
  if i%K==0:
    print("OK")
    p=0
    break
if p==1:
  print("NG")

Buggy submission (verdict: Runtime Error):
K=input()
a,b=map(int,input().split())
p=1
for i in range(a,b+1):
  if i%K==0:
    print("OK")
    p=0
    break
if p==1:
  print("NG")

Buggy submission (verdict: Runtime Error):
K=input()
a,b=map(int,inport().split())
p=1
for i in range(a,b+1):
  if i%K==0:
    print("OK")
    p=0
    break
if p==1:
  print("NG")
Problem p03107 (python)

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

Buggy submission (verdict: Runtime Error):
import re
S = input()
l = len(S)
while True:
  if re.sub('01|10','',S) == S
  	break
  else:
    S = re.sub('01|10','',S)
print(l-len(S))
Problem p03127 (python)

Fixed submission:
from fractions import gcd
from functools import reduce
n = int(input())
print(reduce(gcd,map(int,input().split())))

Buggy submission (verdict: Runtime Error):
from fraction import gcd
from functools import reduce
n = int(input())
print(reduce(gcd,map(int,input().split())))

Buggy submission (verdict: Runtime Error):
from math import gcd
from functools import reduce
n = int(input())
print(reduce(gcd,map(int,input().split())))

Buggy submission (verdict: Runtime Error):
n = int(input())
l = list(map(int,input().split()))
ans = min(l)
if ans == 1:
    print(ans)
else:
    l_set = set(l)
    for i in range(n):
        for j in range(i,n):
            if l[i] % l[j] != 0 :
                l_set.add(l[i] % l[j] )
    l_set = sorted(list(l_set))
    print(min([l_set[i+1] - l_set[i] for i in range(len(l_set)-1)]))
Problem p03221 (python)

Fixed submission:
import numpy as np
n, m = map(int,input().split())
l = [list(map(int,input().split()))+ [0] for i in range(m)]
l2 = sorted(l)
p = 0
for i in l2:
    x = 1 if i[0] != p else x + 1
    p = i[0]
    i[2] = x
for i in l:
    print(str(i[0]).zfill(6)+str(i[2]).zfill(6))

Buggy submission (verdict: Runtime Error):
n, m = map(int,input().split())
l = []
for i in range(m):
    l.append(list(map(int,input().split())))
l2 = l.copy()
l2.sort()
p = 0
l3 = []
for i in l2:
    if i[0] != p:
        p = i[0]
        x = 1
    else:
        x += 1
    l3.append(str(i[0]).zfill(6)+ str(x).zfill(6))
for i in l:
    print(l3[l2.index(i)])
Problem p03104 (python)

Fixed submission:
tmp = input()
A = int(tmp.split()[0])
B = int(tmp.split()[1])
 
res = 0
if A%2 == 0:
	if B%2 == 0:
		res = B^(int((B-A)/2)%2)
	else :
		res = int((B-A+1)/2)%2
else :
	if B%2 == 0:
		res = A^B^(int((B-A-1)/2)%2)
	else :
		res = A^(int((B-A)/2)%2)
print(res)

Buggy submission (verdict: Runtime Error):
tmp = input()
A = int(tmp.split()[0])
B = int(tmp.split()[1])
 
res = 0
if A%2 == 0:
	if B%2 == 0:
		res = B^((B-A)/2%2)
	else :
		res = (B-A+1)/2%2
else :
	if B%2 == 0:
		res = A^B^((B-A-1)/2%2)
	else :
		res = A^((B-A)/2%2)

print(res)
Problem p02897 (python)

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

Buggy submission (verdict: Runtime Error):
N = input()
if N == 1:
  answer = 1
elif N % 2 == 0:
  answer = 1/2
else:
  answer = (1-1/N)/2
return answer
Problem p02711 (python)

Fixed submission:
n=input()
if "7" in n:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n=int(input())
a,b,c=map(int,input().split())
n=abc
if a==7 or b==7 or c==7:
  print("Yes")
else:
  print("No")
Problem p02723 (python)

Fixed submission:
s=input()
if s[2]==s[3] and s[4]==s[5]:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
s=int(input())
if s[2]==s[3] and s[4]==s[5]:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
s=input()
list=[a,b,c,d,e,f]
if list[c]==list[d] or list[e]==list[f]:
  print("Yes")
else:
  print("No")
Problem p02753 (python)

Fixed submission:
def yesno(S):
  if S=="AAA" or S=="BBB":
    return "No"
  else:
    return "Yes"
S=input()
print(yesno(S))

Buggy submission (verdict: Runtime Error):
def yesno(S)

if S=="AAA" or S=="BBB":
  return "No"
else:
  return "Yes"
S=input()
print(yesno(S))

Buggy submission (verdict: Runtime Error):
def yesno(S):

if S=="AAA" or S=="BBB":
  return("No")
else:
  return("Yes")
S=input()
print(yesno(S))

Buggy submission (verdict: Runtime Error):
def yesno(S)

if S=="AAA" or S=="BBB":
  return("No")
else:
  return("Yes")
S=input()
print(yesno(S))

Buggy submission (verdict: Runtime Error):
def yesno(S)

if S=='AAA' or S=='BBB':
  return('No')
else:
  return('Yes')
S=input()
print(yesno(S))

Buggy submission (verdict: Runtime Error):
def yesno(S)
S=int(input())
if S=='AAA' or S=='BBB':
  return('No')
else:
  return('Yes')
print(yesno(S))

Buggy submission (verdict: Runtime Error):
S=input()
A,B=map(str,input().split())
list=[0,1,2]

if list[0]==A and list[1]==A and list[2]==A or list[0]==B and list[1]==B and list[2]==B:
  print('No')
else:
  print('Yes')

Buggy submission (verdict: Runtime Error):
a,b=map(str,input().split())
s=str(input())

if s==aaa or s=bbb:
  print('No')
  
else:
  print('Yes')
Problem p02759 (python)

Fixed submission:
n = int(input())
ans = n//2

if n%2 == 0:
  print(ans)
else:
  print(ans+1)

Buggy submission (verdict: Runtime Error):
n =int(input())
ans = n // 2

if ans = n % 2 == 0:
  print(ans)
else:
  print(ans+1)
Problem p02771 (python)

Fixed submission:
a,b,c=map(int,input().split())
if a==b and a!=c:
  print('Yes')
elif a==c and a!=b:
  print('Yes')
elif b==c and b!=a:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
if a==b and a!=c:
  print('Yes')
elif a==c and a!b:
  print('Yes')
elif b==c and b!=a:
  print('Yes')
else:
  print('No')
Problem p02777 (python)

Fixed submission:
S, T=map(str, input().split())
A, B=map(int, input().split())
U=input()
if S == U:
  print(A-1, B)
else:
  print(A, B-1)

Buggy submission (verdict: Runtime Error):
A,B=map(int,input().split())
S,T=map(str,input().split())
U=input()
if S==U:
  print(A-1,B)
else:
  print(A,B-1)

Buggy submission (verdict: Runtime Error):
S,T=map(str,input().split())
A,B=map(int,input().split())
U=input()

if S==U:
  print(A-1,B)
else:
  T==U:
    print(A,B-1)
Problem p02790 (python)

Fixed submission:
a,b=map(str,input().split())

if a>=b:
  print(b*int(a))
elif b>=a:
  print(a*int(b))

Buggy submission (verdict: Runtime Error):
a,b=map(str,input().split())
if a>=b:
  print(b*a)
elif b>=a:
  print(a*b)
Problem p02829 (python)

Fixed submission:
a=int(input())
b=int(input())
print(6-a-b)

Buggy submission (verdict: Runtime Error):
A=input()
B=input()
print(6-A+B)

Buggy submission (verdict: Runtime Error):
A,B=map(int,input().split())
list=[1,2,3]
if A==list[0],B==list[1] or A==list[1],B==list[0]:
  print(list[2])
elif A==list[0],B==list[2] or A==list[2],B==list[0]:
  print(list[1])
else:
  print(list[0])

Buggy submission (verdict: Runtime Error):
A,B=map(int,input().split())
if A==1,B==2 or A==2,B==1:
  print(3)
elif A==1,B==3 or A==3,B==1:
  print(2)
else:
  print(1)
Problem p02835 (python)

Fixed submission:
A1,A2,A3=map(int,input().split())

if A1+A2+A3>=22:
  print('bust')
else:
  print('win')

Buggy submission (verdict: Runtime Error):
A₁,A₂,A₃=map(int,input().split())

if A₁+A₂+A₃>=22:
  print('bust')
else:
  print('win')
Problem p02847 (python)

Fixed submission:
s = input()
week = {'SUN':0,
        'MON':1,
        'TUE':2, 
        'WED':3, 
        'THU':4, 
        'FRI':5, 
        'SAT':6}
print(7-week[s])

Buggy submission (verdict: Runtime Error):
S=input()
week={'SUN':[0],
      'MON':[1],
      'TUE':[2],
      'WED':[3],
      'THU':[4],
      'FRI':[5],
      'SAT':[6]}
print(7-week[S])

Buggy submission (verdict: Runtime Error):
S=input()
week[S]={'SUN':[0],
      'MON':[1],
      'TUE':[2],
      'WED':[3],
      'THU':[4],
      'FRI':[5],
      'SAT':[6],}
print(7-week[S])

Buggy submission (verdict: Runtime Error):
S=int(input())
week={'SUN':[0]
      'MON':[1]
      'TUE':[2]
      'WED':[3]
      'THU':[4]
      'FRI':[5]
      'SAT':[6]}
print(7-week)

Buggy submission (verdict: Runtime Error):
week={'SUN'=0
      'MON'=1
      'TUE'=2
      'WED'=3
      'THU'=4
      'FRI'=5
      'SAT'=6

print(7-week)
Problem p02879 (python)

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

if 9 >= a >= 1 and 9 >= b >= 1:
  print(a*b)
else:
  print(-1)

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

if 9>=a>=1and9>=b>=1:
  print(a*b)
else:
  print(-1)

Buggy submission (verdict: Runtime Error):
A,B=map(int,input().split())

if 9>=A,B>=1:
  print(A*B)
else:
  print(-1)
Problem p02880 (python)

Fixed submission:
n=int(input())
s=0
for i in range(1,10):
  for j in range(1,10):
    if i*j==n:
      s+=1
      print('Yes')
      break
  else:
    continue
  break
if s==0:
  print('No')

Buggy submission (verdict: Runtime Error):
N=int(input())
A,B=map(int,input().split())
if 9 >= A >= 1 and 9 >= B >= 1 and A*B==N:
  print('Yes')
else:
  print('No')
Problem p02897 (python)

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

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

if N%2==0:
  print(0.5)
else:
  print((N+1)/2*n)
Problem p03075 (python)

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if e - a > k:
    print(":(")
elif e - b > k:
    print(":(")
elif e - c > k:
    print(":(")
elif e - d > k:
    print(":(")
else:
    print("Yay!")

Buggy submission (verdict: Runtime Error):
a.b.c.d.e.k=map(int,input().split())
if abs(a-b)>k or abs(a-c)>k or abs(a-d)>k or abs(a-e)>k or abs(b-c)>k or abs(b-d)>k or abs(b-e)>k or abs(c-d)>k or abs(c-e)>k or abs(d-e)>k:
  print(":(")
else:
  print("Yey!")

Buggy submission (verdict: Runtime Error):
a.b.c.d.e.k=map(int,input().split())
if abs(a-b)<=k and abs(a-c)<=k and abs(a-d)<=k and abs(a-e)<=k and abs(b-c)<=k and abs(b-d)<=k and abs(b-e)<=k abs(c-d)<=k and abs(c-e)<=k and abs(d-e)<=k:
  print("Yey!")
else:
  print(":(")

Buggy submission (verdict: Runtime Error):
a.b.c.d.e.k=map(int,input().split())
if abs(a-b)>=k and abs(a-c)>=k and abs(a-d)>=k and abs(a-e)>=k and abs(b-c)>=k and abs(b-d)>=k and abs(b-e)>=k abs(c-d)>=k and abs(c-e)>=k and abs(d-e)>=k:
  print("Yey!")
else:
  print(":(")
Problem p02688 (python)

Fixed submission:
N, K = map(int, input().split())
L = [list(map(int, input().split())) for _ in range(K*2)]

indexs = []
for i in range(len(L)):
    if i%2 != 0:
        indexs.append(L[i])

uniq_list = []
for li in indexs:
    for e in li:
        if e not in uniq_list:
            uniq_list.append(e)

print(N - len(uniq_list))

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
L = [list(map(int, input().split())) for _ in range(N+1)]

indexs = []
for i in range(len(L)):
    if i%2 != 0:
        indexs.append(L[i])

uniq_list = []
for li in indexs:
    for e in li:
        if e not in uniq_list:
            uniq_list.append(e)

print(N - len(uniq_list))
Problem p02699 (python)

Fixed submission:
s, w = map(int, input().split())
if s > w:
    print("safe")
else:
    print("unsafe")

Buggy submission (verdict: Runtime Error):
s, w = map(int, input().split())

if S > W:
    print('safe')
if S < W:
    print('unsafe')
Problem p02701 (python)

Fixed submission:
N = int(input())
s = set()

for i in range(N):
    s.add(input())
    
print(len(s))

Buggy submission (verdict: Runtime Error):
N = int(input())
s = []

for i in range(N):
    s.add(input())
    
print(len(s))
Problem p02711 (python)

Fixed submission:
x = input()
if x.count("7"):
  print("Yes")
else:
  print("No")

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

if N[0] == '7' or N[1] == '7' or N[2] == '7':
    print("Yes")
else:
    print("No")
Problem p02723 (python)

Fixed submission:
N = input()
if(N[2] == N[3] and N[4] == N[5]):
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
x = int(input())

num_500 = x / 500

amari = x - num_500

num_5 = int(amari / 5)

print(1000 * num_500 + 5 * num_5)
Problem p02753 (python)

Fixed submission:
s = input()

if "A" in s and "B" in s:
    print("Yes")
else:
    print("No")

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

ans = n // (a + b)
ans *= a

if n % (a + b) != 0:
    ans += min(a, n % (a + b))

print(ans)
Problem p02771 (python)

Fixed submission:
a = set(map(int, input().split()))
if len(a) == 2:
  print("Yes")
else:
  print("No")

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

flag = 0

for i in range(N):
    if A[i] % 2 == 0:
        if A[i] % 3 == 0 or A[i] % 5 == 0:
            pass
        else:
            flag = 1
            break
        
if flag = 0:
    print("APPROVED")
else:
    print("DENIED")

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

flag = 0

for i in range(N):
    if A[i] % 2 == 0:
        if A[i] % 3 == 0 or A[i] % 5 == 0:
            pass
        else:
            flag = 1
            break
        
if flag = 0:
    print("PASS")
else:
    print("DENIED")

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

flag = 0

for i in range(N):
    if A[i] % 2 == 0:
        if A[i] % 3 == 0 or A[i] % 5 == 0:
            pass
        else:
            flag = 1
            break
        
 if flag = 0:
    print("PASS")
 else:
    print("DENIED")

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

flag = 0

for i in range(N):
    if A[i] % 2 == 0:
        if A[i] % 3 == 0 or if A[i] % 5 == 0:
            pass
        else:
            flag = 1
            break
        
if flag = 0:
    print("PASS")
else:
    print("DENIED")

Buggy submission (verdict: Runtime Error):
A, B, C = map(int,input().split())

if A == B == C:
    print(No)
    
else:
    print(Yes)
Problem p02773 (python)

Fixed submission:
import collections

n = int(input())
s = []
for i in range(n):
    s.append(input())

c = collections.Counter(s)
c_s = c.most_common()
m = c.most_common()[0][1]
ans = []
for j in range(len(c_s)):
    if c_s[j][1] != m:
        break
    else:
        ans.append(c_s[j][0])
ans.sort()
for t in ans:
    print(t)

Buggy submission (verdict: Runtime Error):
import collections

N = int(input())
a = []

for i in range(N):
    a.append(str(input()))
a = collections.Counter(a)
b = max(a.values())

max_k_list = [kv[0] for kv in a.items() if kv[1] == b]
max_k_list = sorted(max_k_list)

for i in max_k_list:
print(i)