qyliang/CodeNanoFix huggingface dataset:
Buggy code:
N = int(input())
X = [int(x) for x in input().split()]
print(X)
result = list(filter(lambda x: x % 2 == 0, X))
count = 0
for i in result:
    if i % 3 == 0 or i % 5 == 0:
        count += 1
print('APPROVED' if count == len(result) else 'DENIED')

Fixed code:
N = int(input())
X = [int(x) for x in input().split()]
result = list(filter(lambda x: x % 2 == 0, X))
count = 0
for i in result:
    if i % 3 == 0 or i % 5 == 0:
        count += 1
print('APPROVED' if count == len(result) else 'DENIED')
Buggy code:
N = int(input())
A = list(map(int, input().split()))
ans = True
for i in A:
    if i%2 == 0 and (i%3 == 0 or i%5 == 0):
        continue
    else:
        ans = False
print("APPROVED" if ans==True else "DENIED")

Fixed code:
N = int(input())
A = list(map(int, input().split()))
ans = True
for i in A:
    if i%2 == 0:
        if i%3 == 0 or i%5 == 0:
            continue
        else:
            ans = False
print("APPROVED" if ans==True else "DENIED")
Buggy code:
Nnum=int(input())
An=np.array([int(i) for i in input().split()])
Ane=An[An%2==0]
Ane3=Ane%3
Ane5=Ane%5
Ane3or5=Ane3*Ane5

if(np.sum(Ane3or5)==0):
    print("APPROVED")
else:
    print("DENIED")    

Fixed code:
import numpy as np
Nnum=int(input())
An=np.array([int(i) for i in input().split()])
Ane=An[An%2==0]
Ane3=Ane%3
Ane5=Ane%5
Ane3or5=Ane3*Ane5

if(np.sum(Ane3or5)==0):
    print("APPROVED")
else:
    print("DENIED")
Buggy code:
# -*- coding: utf-8 -*-
n = input() # 2 ~ 99
an = [int(x.strip()) for x in input().split(' ')]

count = 0
for i in an:
  if i % 2 == 0:
    if i % 3 == 0 or i % 5 == 0:
      count += 1
      break
if count >= 1:
  print('APPROVED')
else:
  print('DENIED')

Fixed code:
# -*- coding: utf-8 -*-
n = input() # 2 ~ 99
an = [int(x.strip()) for x in input().split(' ')]

count = 0
check = 0
for i in an:
  if i % 2 == 0:
    check += 1
    if i % 3 == 0 or i % 5 == 0:
      count += 1
if count == check or check == 0:
  print('APPROVED')
else:
  print('DENIED')
Buggy code:
N = int(input())
A = list(map(int, input().split()))

in_flag = True
for a in A:
    if a % 2 == 0:
        if a % 3 == 0 or a % 5 == 0:
            in_flag = True
        else:
            in_flag = False
    else:
        pass

if in_flag:
    print("APPROVED")
else:
    print("DENIED")

Fixed code:
N = int(input())
A = list(map(int, input().split()))

in_flag = True
for a in A:
    if a % 2 == 0:
        if a % 3 == 0 or a % 5 == 0:
            in_flag = True
        else:
            in_flag = False
            break
    else:
        pass

if in_flag:
    print("APPROVED")
else:
    print("DENIED")
Buggy code:
n = int(input())
a = list(map(int,input().split()))
count = 0
for i in range(n):
    if a[i]%2 == 0:
        if a[i]%3 == 0 or a[i]%5 == 0:
            count += 1
print("APPROVED" if count >=1 else "DENIED")

Fixed code:
n = int(input())
a = list(map(int,input().split()))
count = 0
for i in range(n):
    if a[i]%2 == 0:
        if a[i]%3 == 0 or a[i]%5 == 0:
            count += 1
        else:
            count -=200
print("APPROVED" if count >=0  else "DENIED")
Buggy code:
N=input()
A=input().split()

def validate(i):
    I=i%2
    if I==0:
        I1=i%3
        I2=i%5
        if I1==0 or I2==0:
            return "Yes"
        else:
            return "No"
    else:
        return "Yes"

for i in A:
    X=validate(int(i))

if "No" in X:
    print("DENIED") 
else:
     print("APPROVED") 

Fixed code:
N=input()
A=input().split()

def validate(i):
    I=i%2
    if I==0:
        I1=i%3
        I2=i%5
        if I1==0 or I2==0:
            return "Yes"
        else:
            return "No"
    else:
        return "Yes"

X = []
for i in A:
    X.append(validate(int(i)))

if "No" in X:
    print("DENIED") 
else:
    print("APPROVED")
Buggy code:
l = list(map(lambda x: True if int(x)%2==1or(int(x)%2==0and(int(x)%3==0 or int(x)%5==0)) else False,input().split()))
print("APPROVED" if sum(l)==len(l) else "DENIED")

Fixed code:
input();l = list(map(lambda x: True if int(x)%2==1or(int(x)%2==0and(int(x)%3==0 or int(x)%5==0)) else False,input().split()))
print("APPROVED" if sum(l)==len(l) else "DENIED")
Buggy code:
n=int(input())
a=list(map(int,input().split()))
checker=0
count=0
for i in range(len(a)):
  if a[i]%2==0:
    checker+=1
    if a[i]%3==0 or a[i]%5==0:
      count+=1
if checker==count:
  print("APPROVED")
else:
  print("DENIED)

Fixed code:
n=int(input())
a=list(map(int,input().split()))
checker=0
count=0
for i in range(len(a)):
  if a[i]%2==0:
    checker+=1
    if a[i]%3==0 or a[i]%5==0:
      count+=1
if checker==count:
  print("APPROVED")
else:
  print("DENIED")
Buggy code:
N  = int(input())
l = list(map(int, input().split()))

for i in l:
    if i % 2 == 0:
        if i % 3 !=0 or i % 5 != 0:
            print("DENIED")
            exit()

print("APPROVED")

Fixed code:
N  = int(input())
l = list(map(int, input().split()))

for i in l:
    if i % 2 == 0:
        if i % 3 !=0 and i % 5 != 0:
            print("DENIED")
            exit()

print("APPROVED")
Buggy code:
n = int(input())
a = list(map(int, input().split()))
ans = [True] * n
for i in range(n):
    if a[i]%2==0:
         a[i]%3!=0 and a[i]%5!=0
         ans[i] = False
if ans:
    print('APPROVED')
else:
    print('DENIED')

Fixed code:
n = int(input())
a = list(map(int, input().split()))
ans = [True] * n
for i in range(n):
    if a[i]%2==0:
        if a[i]%3!=0 and a[i]%5!=0:
        	ans[i] = False
if all(ans):
    print('APPROVED')
else:
    print('DENIED')
Buggy code:
import numpy as np

N = int(input())
A = np.array([int(val) for val in A])

A_even = set(A[A%2==0])
A_three = set(A[A%3==0])
A_five = set(A[A%5==0])

A_approve = A_even & (A_three | A_five)

if A_even == A_approve:
    print('APPROVED')
else:
    print('DENIED')

Fixed code:
import numpy as np
 
N = int(input())
A = input().split()
A = np.array([int(val) for val in A])
 
A_even = set(A[A%2==0])
A_three = set(A[A%3==0])
A_five = set(A[A%5==0])
 
A_approve = A_even & (A_three | A_five)
 
if A_even == A_approve:
    print('APPROVED')
else:
    print('DENIED')
Buggy code:
n=int(input())
seq=input().split()
check=0
for i in range(n):
  if int(seq[i])%2==0:
    if int(seq[i])%3!=0 or int(seq[i])%5!=0:
      check+=1
if check==0:
  print("APPROVED")
else:
  print("DENIED")

Fixed code:
n=int(input())
seq=input().split()
check=0
for i in range(n):
  if int(seq[i])%2==0:
    if int(seq[i])%3!=0 and int(seq[i])%5!=0:
      check+=1
if check==0:
  print("APPROVED")
else:
  print("DENIED")
Buggy code:
n = int(input())
a = list(map(int,input().split()))
ans = 'DENIED'
for x in a:
    if x % 2 == 0 and x % 3 == 0 or x % 5 == 0 :
        ans = 'APPROVED'
print(ans)

Fixed code:
n = int(input())
a = list(map(int,input().split()))
ans = 'APPROVED'
for x in a:
    if x % 2 == 1:
        continue
    if not (x % 2 == 0 and (x % 3 == 0 or x % 5 == 0)) :
        ans = 'DENIED'
print(ans)
Buggy code:
N = int(input())
A = list(map(int,input().split()))


B=[]

for i in range(N):
    if A[i]%2==1:
        B.append(0)
    elif A[i]%3==0:
        B.append(0)
    elif A[i]%5==0:
        B.append(0)
    else:
        B.append(1)

T = sum(B)
print(T)
if T==0:
    print("APPROVED")
else:
    print("DENIED")
        


Fixed code:

N = int(input())
A = list(map(int,input().split()))


B=[]

for i in range(N):
    if A[i]%2==1:
        B.append(0)
    elif A[i]%3==0:
        B.append(0)
    elif A[i]%5==0:
        B.append(0)
    else:
        B.append(1)

T = sum(B)

if T==0:
    print("APPROVED")
else:
    print("DENIED")
Buggy code:
N = int(input())

A = list(map(int, input().split()))

n=0

for i in range(N):
    a=A[i]
    if a%2==0 and (a%3!=0 or a%5!=0):
        n+=1

if n==0:
    print("APPROVED")
else:
    print("DENIED")

Fixed code:
N = int(input())

A = list(map(int, input().split()))

n=0

for i in range(N):
    a=A[i]
    if a%2==0 and a%3!=0:
        if a%5!=0:
            n+=1

if n==0:
    print("APPROVED")
else:
    print("DENIED")
Buggy code:
n = input()
list = input().split(" ")
for number in list:
  int_number = int(number)
  if (int_number % 2) == 0:
    if int_number %3 != 0:
      if int_number %5 != 0:
      	print("DENIED")
      	exit()
print("ACCEPTED")


Fixed code:
n = input()
list = input().split(" ")
for number in list:
  int_number = int(number)
  if (int_number % 2) == 0:
    if int_number %3 != 0:
      if int_number %5 != 0:
      	print("DENIED")
      	exit()
print("APPROVED")
Buggy code:
N = input()
A = list(map(str, input().split()))
B=[]
l=[]
m=[]
i=0
for a in range(int(N)):
    if int(A[a])%2==0:
       B.append(A[a])
       i=i+1
for a in range(int(i)):
    if not int(B[a])%3==0 or int(B[a])%5==0:
       C.append(B[a])
    else:
       C=[0]
if C==0:
   print("DENIED")
else:
   print("APPROVED")

Fixed code:
N = input()
A = list(map(str, input().split()))
B=[]
C=[]
l=[]
m=[]
n=0
i=0
for a in range(int(N)):
    if int(A[a])%2==0:
       B.append(A[a])
       i=i+1
for a in range(int(i)):
    if int(B[a])%3==0 or int(B[a])%5==0:
       n=n+1
if n==i:
   print("APPROVED")
else:
   print("DENIED")
Buggy code:
n = int(input())
arr = [int(i) for i in input().split()]

for d in arr :
  
  if d % 2 == 0 :
    
    if d % 3 == 0 :

      pass
    
    elif d % 5 = 0 : 
      pass
    
    else :

      print("DENIED")
      exit()
      
print("APPROVED")

Fixed code:
n = int(input())
arr = [int(i) for i in input().split()]

for d in arr :
  
  if d % 2 == 0 :
    
    if d % 3 == 0 or d % 5 == 0:

      pass
    
    else :

      print("DENIED")
      exit()
      
print("APPROVED")
Buggy code:
n = int(input())
a = list(map(int, input().split()))

for i in range(n):
    if a[i] % 2 == 0:
        if a[i] % 3 == 0 or a[i] % 5:
            continue
        else:
            print('DENIED')
            exit()
print('APPROVED')

Fixed code:
n = int(input())
a = list(map(int, input().split()))

for i in range(n):
    if a[i] % 2 == 0:
        if a[i] % 3 == 0 or a[i] % 5 == 0:
            continue
        else:
            print('DENIED')
            exit()
print('APPROVED')
Buggy code:
n = int(input())
a = list(int(x) for x in input().split() if int(x)%2==0)
ok = True
for i in a:
  if i%3==0 or i%5==0:
    print('DENIED')
    ok = False
    break
if ok:
  print('APPROVED')

Fixed code:
n = int(input())
a = list(int(x) for x in input().split() if int(x)%2==0)
ok = True
for i in a:
  if i%3!=0 and i%5!=0:
    print('DENIED')
    ok = False
    break
if ok:
  print('APPROVED')
Buggy code:
n = input()
list = [int(i) for i in input().split()]

for i in range(n):
    if list[i] %2 == 0:
        if list[i]%3 == 0 or list[i] %5 == 0:
            continue
        else:
            print("DENIED")
            break
else:
    print("APPROVED")


Fixed code:
n = int(input())
list = [int(i) for i in input().split()]

for i in range(n):
    if list[i] %2 == 0:
        if list[i]%3 == 0 or list[i] %5 == 0:
            continue
        else:
            print("DENIED")
            break
else:
    print("APPROVED")
Buggy code:
N=int(input())
A=input().split
for i in range(N):
  if int(A[i])%2==0:
    if int(A[i])%5==0 or int(A[i])%3==0:
      x+=1
  else:
    x+=1
if x==N:
  print('APPROVED')
else:
  print('DENIED')





Fixed code:
N=int(input())
A=input().split()
x=0
for i in range(N):
  if int(A[i])%2==0:
    if int(A[i])%5==0 or int(A[i])%3==0:
      x+=1
  else:
    x+=1
if x==N:
  print('APPROVED')
else:
  print('DENIED')
Buggy code:
_ = input()
*a,=input().split()
flag = True
for i in a:
  if i%2 == 0:
    if i%3 != 0:
      if i%5 != 0:
        flag = False
        break
if flag:
  print("APPROVED")
else:
  print("DENIED")

Fixed code:
_ = input()
a=map(int,input().split())
flag = True
for i in a:
  if i%2 == 0:
    if i%3 != 0:
      if i%5 != 0:
        flag = False
        break
if flag:
  print("APPROVED")
else:
  print("DENIED")
Buggy code:
n=int(input())
a=list(map(int,input().split()))
for i in range(m):
  if a[i]%2==0:
    if a[i]%3!=0 and a[i]%5!=0:
      print('DENIED')
      exit()
print('APPROVED')

Fixed code:
import sys
n=int(input())
a=list(map(int,input().split()))
for i in range(n):
  if a[i]%2==0:
    if a[i]%3!=0 and a[i]%5!=0:
      print('DENIED')
      sys.exit()
print('APPROVED')
Buggy code:
N = int(input())
L = list(map(int, input().split()))
count = 0
for i in range(0, N):
  if L[i]%2==0:
    if L[i]%3==0 or L[i]%5==0:
      print("APPROVED")
      count = 1

if count == 0:
  print("DENIED")

Fixed code:
N = int(input())
L = list(map(int, input().split()))
count = 0
count2 = 0
for i in range(0, N):
  if L[i]%2==0:
    count = count + 1
    if L[i]%3==0 or L[i]%5==0:
      count2 = count2 + 1

if count == count2:
  print("APPROVED")
else:
  print("DENIED")
Buggy code:
N=input()
A=list(map(int,input().split()))
for i in range(N):
  if A[i]%2==0:
    if A[i]%3!=0 and A[i]%5!=0:
      print('DENIED')
      exit()
print('APPROVED')
      

Fixed code:
N=int(input())
A=list(map(int,input().split()))
for i in range(N):
  if A[i]%2==0:
    if A[i]%3!=0 and A[i]%5!=0:
      print('DENIED')
      exit()
print('APPROVED')
Buggy code:
list = [int(i) for i in input().split()]
N = list[0]
A = list[1:N+1]
if all([i%2==1 for i in A]):
    print('APPROVED')
else:
    even = [i for i in A if i%2==0]
    even = [0 if i%3==0 or i%5==0 else i for i in even]
    if max(even)>0:
        print('DENIED')
    else:
        print('APPROVED')

Fixed code:
N = [int(i) for i in input().split()]
A = [int(i) for i in input().split()]
if all([i%2==1 for i in A]):
    print('APPROVED')
else:
    even = [i for i in A if i%2==0]
    even = [0 if i%3==0 or i%5==0 else 1 for i in even]
    if max(even)==1:
        print('DENIED')
    else:
        print('APPROVED')
Buggy code:
n = int(input())
a = list(map(int, input().split()))

for i in a:
    if not i%2 and i%3 and i%5:
        print("DENIED")
        break
    else:
        print("APPROVED")

Fixed code:
n=int(input())
a=list(map(int,input().split()))
for i in a:
    if i%2==0:
        if (i%3!=0 and i%5!=0):
            print("DENIED")
            break
else:
    print("APPROVED")
Buggy code:
length = int(input())
li = list(map(int,input().split()))

judge = True

for i in range(length):
  a = li[i]
  if a % 2 == 0:
      if not a % 3 == 0 or a % 5 == 0:
          judge = False
          break;
  
if judge:
  print("APPROVED")
else:
  print("DENIED")

Fixed code:
length = int(input())
li = list(map(int,input().split()))

judge = True

for i in range(length):
  a = li[i]
  if a % 2 == 0:
      if not (a % 3 == 0 or a % 5 == 0):
          judge = False
          break;
  
if judge:
  print("APPROVED")
else:
  print("DENIED")
Buggy code:
n = int(input())
numbers = [int(x) for x in input().split()]
flag = 'APPROVED'
for number in numbers:
  if number%2==0 and (number % 3 == 0 or number % 5 == 0):
    continue
  else:
    flag = 'DENIED'
    break
print(flag)


Fixed code:
n = int(input())
numbers = [int(x) for x in input().split()]
flag = 'APPROVED'
for number in numbers:
  if number%2==0 and (number % 3 == 0 or number % 5 == 0):
    continue
  elif number%2 != 0: continue
  else:
      flag = 'DENIED'
      break
print(flag)
Buggy code:
N = int(input())
A = list(map(int, input().split()))

for i in range(N):
  if A[i] % 2 == 0:
    if A[i] % 3 != 0 and A[i] % 5 != 0:
      print('DENIED')
      break
    elif i != N:
      continue
    else:
      print('APPROVED')

Fixed code:
N = int(input())
A = list(map(int, input().split()))

for i in range(N):
  if A[i] % 2 == 0:
    if A[i] % 3 != 0 and A[i] % 5 != 0:
      print('DENIED')
      break
    elif i != N-1:
      continue
    else:
      print('APPROVED')
      break
  elif i != N-1:
    continue
  else:
    print('APPROVED')
    break
Buggy code:
N = int(input())
l = list(map(int, input().split()))

check_list = []
for num in l:
    if num % 2 == 0:
        check_list.append(num)

n = len(check_list)
i = 0
while i < n:
    if (check_list[i] % 2 == 0) or (check_list[i] % 3 == 0):
        i += 1
    else: break
if i == n:
    print('APPROVED')
else: print('DENIED')

Fixed code:
N = int(input())
l = list(map(int, input().split()))
 
check_list = []
for num in l:
    if num % 2 == 0:
        check_list.append(num)
 
n = len(check_list)
i = 0
while i < n:
    if (check_list[i] % 3 == 0) or (check_list[i] % 5 == 0):
        i += 1
    else: break
if i == n:
    print('APPROVED')
else: print('DENIED')
Buggy code:
n = int(input())
x = list(map(int,input().split()))
for i in x:
  if i%2==0:
    if i%6!=0 or i%10!=0:
      print("DENIED")
      exit()
print("APPROVED")

Fixed code:
n = int(input())
x = list(map(int,input().split()))
for i in x:
  if i%2==0:
    if i%6!=0:
      if i%10!=0:
        print("DENIED")
        exit()
print("APPROVED")
Buggy code:
# Papers, Please

N = int(input())
A = list(map(int, input().split()))

for Ai in A:
  if Ai % 2 == 1:
    continue
  else:
    if Ai % 3 != 0 and Ai % 5 != 0:
      print("DENIED")
      exit()

print("AOOROVED")

Fixed code:
# Papers, Please

N = int(input())
A = list(map(int, input().split()))

for Ai in A:
  if Ai % 2 == 1:
    continue
  else:
    if Ai % 3 != 0 and Ai % 5 != 0:
      print("DENIED")
      exit()

print("APPROVED")
Buggy code:
N = int(input())
A = list(map(int,input().split()))

A_even =list()

for i in range(len(A)):
    if A[i] % 2 == 0:
        A_even.append(A[i])

miss = True


for i in range(len(A_even)):
    if A_even[i]%3 == 0 or A_even[i]%5 == 0:
        pass
    else:
        miss = False
        break
if miss:
    print("DENIED")
else:
    print("APPROVED")


Fixed code:
N = int(input())
A = list(map(int,input().split()))

A_even =list()

for i in range(len(A)):
    if A[i] % 2 == 0:
        A_even.append(A[i])

miss = True


for i in range(len(A_even)):
    if A_even[i]%3 == 0 or A_even[i]%5 == 0:
        pass
    else:
        miss = False
        break
if miss:
    print("APPROVED")
else:
    print("DENIED")
Buggy code:

A = list(map(int, input().split()))
count = 0
for a in A:
 if (a % 2 == 0 and a % 3 != 0) and (a % 2 == 0 and a % 5 != 0):
   count = count + 1

if count >= 1 :
 print('DENIED')
else:
 print('APPROVED')

Fixed code:
N = int(input())
A = list(map(int, input().split()))
count = 0
for a in A:
 if (a % 2 == 0 and a % 3 != 0) and (a % 2 == 0 and a % 5 != 0):
   count = count + 1

if count >= 1 :
 print('DENIED')
else:
 print('APPROVED')
Buggy code:
# -*- coding: utf-8 -*-

def main():
    n = int(input())
    a_list = list(map(int, input().split()))

    ans = 'APPROVED'

    for i in a_list:
        if divide(i, 2):
            if not divide(i, 3) and not divide(i, 5):
                print(i)
                ans = 'DENIED'
                break
    
    print(ans)

def divide(x, k):
    if x % k == 0:
        return True
    return False

if __name__ == "__main__":
    main()


Fixed code:
# -*- coding: utf-8 -*-

def main():
    n = int(input())
    a_list = list(map(int, input().split()))

    ans = 'APPROVED'

    for i in a_list:
        if divide(i, 2):
            if not divide(i, 3) and not divide(i, 5):
                ans = 'DENIED'
                break
    
    print(ans)

def divide(x, k):
    if x % k == 0:
        return True
    return False

if __name__ == "__main__":
    main()
Buggy code:
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:
      flag=1
      break
if flag==1:
  print("DENIED")
else:
  print("APPROVED")

Fixed code:
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 and A[i]%5>0:
      flag=1
      break
if flag==1:
  print("DENIED")
else:
  print("APPROVED")
Buggy code:
N = int(input())
Nx = input().split()
g = []
for x in Nx:
    if x % 2 == 0:
        g.append(x)

for i in g:
    if not i % 3 == 0:
        if not i % 5 == 0:
            print("DENIED")
            break
    else:
        continue
    print("APPROVED")

Fixed code:
N = int(input())
Nx = input().split()
g = []
for x in Nx:
    x = int(x)
    if x % 2 == 0:
        g.append(x)
ans = 0
for i in g:
    if not i % 3 == 0:
        if not i % 5 == 0:
            ans = 1
            break
        else:
          continue
    else:
        continue
if ans == 1:
    print("DENIED")
else:
    print("APPROVED")
Buggy code:
def solve(n, a):
    for i in range(n):
        if a[i] % 2 == 0:
            if not 0 in [a[i] % 3, a[i] % 5]:
                return "DEFINED"
    return "APPROVED"

n = int(input())
a = list(map(int, input().split()))
print(solve(n, a))

Fixed code:
def solve(n, a):
    for i in range(n):
        if a[i] % 2 == 0:
            if not 0 in [a[i] % 3, a[i] % 5]:
                return "DENIED"
    return "APPROVED"

n = int(input())
a = list(map(int, input().split()))
print(solve(n, a))
Buggy code:
N = int(input())
A = list(map(int, input().split()))
flag = True
for i in range(N-1):
    if A[i]%2==0 and A[i]%3!=0 and A[i]%5!=0:
        flag = False
        print(i)
        break
if flag==True:
    print('APPROVED')
else:
    print('DENIED')

Fixed code:
N = int(input())
A = list(map(int, input().split()))
flag = True
for i in range(N):
    if A[i]%2==0 and A[i]%3!=0 and A[i]%5!=0:
        flag = False
        break
if flag:
    print('APPROVED')
else:
    print('DENIED')
Buggy code:
input()
a = list(map(int, input().split()))
b = []
for i in range(len(a)):
  if (a[i] % 2) == 0:
    if (((a[i] % 3) == 0) or ((a[i] % 5) == 0)):
      b.append(True)
    else: 
      b.append(False)
if (len(b) == 0) or (False in b):
  print("APPROVED")
else:
  print("DENIED")

Fixed code:
input()
a = list(map(int, input().split()))
b = []
for i in range(len(a)):
  if (a[i] % 2) == 0:
    if (((a[i] % 3) == 0) or ((a[i] % 5) == 0)):
      b.append(True)
    else: 
      b.append(False)
if (False in b):
  print("DENIED")
else:
  print("APPROVED")
Buggy code:
N = int(input())
array = map(int, input().split())
for a in array:
    if a % 3 != 0 and a % 5 != 0:
        print("DENIED")
        break
else:
    print("APPROVED")

Fixed code:
N = int(input())
array = map(int, input().split())
for a in array:
    if a % 2 == 0:
        if a % 3 != 0 and a % 5 != 0:
            print("DENIED")
            break
else:
    print("APPROVED")
Buggy code:
import sys

N = list(map(int, input().split()))
print(N)
A = list(map(int, input().split()))
print(A)

for x in A:
    if (x % 2 == 0) and ((x % 3 != 0) and (x % 5 != 0)):
        print('DENIED')
        sys.exit()

print ('APPROVED')


Fixed code:
import sys

N = list(map(int, input().split()))
A = list(map(int, input().split()))

for x in A:
    if (x % 2 == 0) and (x % 3 != 0) and (x % 5 != 0):
        print('DENIED')
        sys.exit()

print ('APPROVED')
Buggy code:
n = int(input())
a = list(map(int, input().split()))

for num in a:
    if num % 2 == 0:
        if num%3==0 or num%5==0:
            pass
        else:
            print('DENIED')

print('APPROVED')

Fixed code:
n = int(input())
a = list(map(int, input().split()))

for num in a:
    if num % 2 == 0:
        if num%3==0 or num%5==0:
            pass
        else:
            print('DENIED')
            exit()

print('APPROVED')
Buggy code:
N=int(input())
li=map(int,input().split())
for k in li:
  if k %2=0:
    if k%3=0 or k%5=0:
      continue
    else:
      print('APPROVED')
      break
  else:
    continue
  print('DENIED')

Fixed code:
N=int(input())
li=map(int,input().split())
a=0
for k in li:
  if k %2==0:
    if k%3==0 or k%5==0:
      continue
    else:
      a=1
      break
if a==0:
  print('APPROVED')
else:
  print('DENIED')
Buggy code:
N=int(input())
A=list(map(int,input().split(' ')))
for i in A:
    if i%2==0 and i%2!=0 and i%5==0:
        print('DENIED')
        exit()
print('APPROVED')

Fixed code:
N=int(input())
A=list(map(int,input().split(' ')))
for i in A:
    if i%2==0 and i%3!=0 and i%5!=0:
        print('DENIED')
        exit()
print('APPROVED')
Buggy code:
import sys
n = int(input())

a = list(map(int, input().split()))

for i in range(n):
  if n % 2 != 0:
    continue
  else:
    if n % 3 == 0 or n % 5 == 0:
      print('DENIED')
      sys.exit()
      

print('APPROVED')

Fixed code:
import sys
n = int(input())

a = list(map(int, input().split()))

for i in range(n):
  if a[i] % 2 != 0:
    continue
  else:
    if a[i] % 3 == 0 or a[i] % 5 == 0:
      pass
    else:
      print('DENIED')
      sys.exit()
      

print('APPROVED')