qyliang/CodeNanoFix huggingface dataset:
Buggy code:
N=int(input())
A=list(map(int,input().split()))
a=[]
b=[]
for i in A:
    if i%2==0:
        a.append(i)
for n in a:
    if n%3==0 or n%5==0:
        b.append(n)
if len(a)==len(b):
    print('APPROAD')
else:
    print('DENIED')

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

n = []
# for i in range(x):
#     n[i] = int(input())
n = [int(e) for e in input().split()]

def cal(n):
    count = 0
    for i in range(len(n)):
        if n[i] % 2 == 0 and n[i] % 3 == 0 and n[i] % 5 == 0:
            count += 1
    if count == len(n):
        print("APPROVED")
    else:
        print("DENIED")

cal(n)


Fixed code:

x = int(input())

n = []
# for i in range(x):
#     n[i] = int(input())
n = [int(e) for e in input().split()]

def cal(n):
    count = 0
    for i in range(len(n)):
        if n[i] % 2 == 0:
           if n[i] % 3 == 0 or n[i] % 5 == 0:
                count += 1
        else:
            count += 1
    if count == len(n):
        print("APPROVED")
    else:
        print("DENIED")

cal(n)
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 == 0:
            continue
        else:
            print('DENIED')

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())

text = 'APPROVED'
for count in A:
    if(count % 2 == 0):
        if(not(count % 3 == 0 or count % 5 == 0)):
            text = 'DENYED'
            break

print(text)

Fixed code:
n = int(input())
A = list(int(x) for x in input().split())

text = 'APPROVED'
for count in A:
    if(count % 2 == 0):
        if(not(count % 3 == 0 or count % 5 == 0)):
            text = 'DENIED'
            break

print(text)
Buggy code:
n=int(input())
l=list(input().split())
ln=[]
m=0
for i in l:
  if int(i)%2==0:
    ln.append(int(i))
for k in ln:
  if k%3==0 or k%5==0:
    m=m+1
if m==len(ln):
  print("APPROVED")
else:
  print("DENYED")

Fixed code:
n=int(input())
l=list(input().split())
ln=[]
m=0
for i in l:
  if int(i)%2==0:
    ln.append(int(i))
for k in ln:
  if k%3==0 or k%5==0:
    m=m+1
if m==len(ln):
  print("APPROVED")
else:
  print("DENIED")
Buggy code:
a=int(input())
list=list(input().split())

for i in range(a):
  if int(list[i])%2 == 0:
    if int(list[i])%3 !=0 and int(list[i])%5 !=0:
      print('DENIED')

print('APPROVED')
    

Fixed code:
a=int(input())
list=list(input().split())
result=1
for i in range(a):
  if int(list[i])%2 == 0:
    if int(list[i])%3 !=0 and int(list[i])%5 !=0:
      print('DENIED')
      result=0
      break
if result != 0:
	print('APPROVED')
Buggy code:
n=int(input())
A=list(map(int,input().split()))
for i in A:
  if i%2==0:
    if i%3!=0 or 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:
      if i%3!=0 and i%5!=0:
        print("DENIED");exit()
print("APPROVED")
Buggy code:
N =int(input())
Alist=list(map(int,input().split()))

Flag=True
for i in range(N):
    print(i)
    if Alist[i]%2==0:
        if Alist[i]%3==0 or Alist[i]%5==0:
            continue
        else:
            Flag=False

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

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

Flag=True
for i in range(N):
    if Alist[i]%2==0:
        if Alist[i]%3==0 or Alist[i]%5==0:
            continue
        else:
            Flag=False

if Flag:
    print("APPROVED")
else:
    print("DENIED")
Buggy code:
n = int(input())
nums = list(map(int, input().split()))
chk = True
for i in nums:
    if i%2==0:
        if i%3==0 and i%5==0:
            pass
        else:
            chk = False:
    else:
        pass
if chk == True:
    print('APPROVED')
else:
    print('DENIED')

Fixed code:
n = int(input())
nums = list(map(int, input().split()))
chk = True
for i in nums:
    if i%2==0:
        if i%3==0 or i%5==0:
            pass
        else:
            chk = False
    else:
        pass
if chk == True:
    print('APPROVED')
else:
    print('DENIED')
Buggy code:
n = int(input())
a = list(map(int, input().split()))
for i in range(n):
    if a[i]%2 == 0:
        if a[i]%5 != 0 or a[i]%3 != 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]%5 == 0 or a[i]%3 == 0:
            pass
        else:
            print("DENIED")
            exit()
print("APPROVED")
Buggy code:
n = int(input())
a = list(map(int, input().split()))
ans = DENIED

for i in range(n):
  if a[i]%2 == 1:
    continue
  else:
    if a[i]%3==0 or a[i]%5==0:
      continue
    else:
      break
else:
  ans = APPROVED

print(ans)

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

list2=[]
for i in list:
    if i%2==0:
        list2.append(i)

if list2:
    while all(i%3==0 or i%5==0 for i in list2):
        print('APPROVED')
    else:
        print('DENIED')
else:
    print('DENIED')
    
          

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

list2=[]
for i in list:
    if i%2==0:
        list2.append(i)

if list2:
    if all(i%3==0 or i%5==0 for i in list2):
        print('APPROVED')
    else:
        print('DENIED')
else:
    print('APPROVED')
Buggy code:
N = int(input())

a = [int(i) for i in input().split()]

x=[]
j=0
for i in range(N):
  if a[i] %2 ==0:
    x.append(a[i])
    j +=1
    
for i in range(j):
  if x[i] %3 ==0 or x[i] %5 ==0:
    print("APPROVED")
  else:
    print("DENIED")



Fixed code:
N = int(input())

a = [int(i) for i in input().split()]
v=0
x=[]
j=0
for i in range(N):
  if a[i] %2 ==0:
    x.append(a[i])
    j +=1

    
for i in range(j):
  if x[i] %3 ==0 or x[i] %5 ==0:
    v += 1

if v == j:
  print("APPROVED")
else:
  print("DENIED")
Buggy code:
n = int(input())
A = [int(x) for x in input().split() 
     if int(x) % 2 == 1 or int(x) % 6 == 0 or int(x) % 10 == 0 ]
if len(A) = N:
    print("APPROVED")
else:
    print("DENIED")

Fixed code:
N = int(input())
A = [int(x) for x in input().split() 
     if int(x) % 2 == 1 or int(x) % 6 == 0 or int(x) % 10 == 0 ]
if len(A) == N:
    print("APPROVED")
else:
    print("DENIED")
Buggy code:
n = int(input())
A = list(map(int,input().split()))
ans = 1
for a in A:
  if a % 2 == 0:
    if a % 3 != 0 or a % 5 != 0:
      ans = 0
      break()
      
if ans:
  print(APPROVED)
else:
  print(DENIED)
  



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

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

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

deny = False

for ele in l:
  if ele%2==0:
    if ele%3!=0 and ele%5!=0:
      print("DENIED")
      deny = True
      break;

if !deny:
  print("APPROVED)

Fixed code:
num = int(input())
l = [int(i) for i in input().split(" ")]
 
deny = False
 
for ele in l:
  if ele%2==0:
    if ele%3!=0 and ele%5!=0:
      print("DENIED")
      deny = True
      break;
 
if not deny:
  print("APPROVED")
Buggy code:
n=int(input())
a = list(map(int, input().split()))
for i in a:
  if a % 2=0:
    if a%3=0 or a%5=0:
      print('APPROVED')
      exit()
print('DENIED')

Fixed code:
n=int(input())
a = list(map(int, input().split()))
for i in a:
  if i % 2==0:
    if i % 3 == 0 or i % 5 ==0:
      continue
    else:
      print('DENIED')
      exit()
      
print('APPROVED')
Buggy code:
input()
o = True
for i in map(int, input().split()):
  if i % 2 == 0:
  	if i % 3 == 1 and i % 5 == 1:
  		o = False

if o is True:
  print("APPROVED")
else:
  print("DENIED")

Fixed code:
input()
o = True
for i in map(int, input().split()):
  if i % 2 == 0:
  	if not i % 3 == 0 and not i % 5 == 0:
  		o = False

if o is True:
  print("APPROVED")
else:
  print("DENIED")
Buggy code:
n = input()
X = set(map(int, input().split()))
E = [x for x in X if x % 2 == 0]
EE = [e for e in E if (e % 3 == 0 or e % 5 == 0)]
if len(E) == len(EE):
    print("APPLOVED")
else:
    print("DENIED")


Fixed code:
n = input()
X = set(map(int, input().split()))
E = [x for x in X if x % 2 == 0]
EE = [e for e in E if (e % 3 == 0 or e % 5 == 0)]
if len(E) == len(EE):
    print("APPROVED")
else:
    print("DENIED")
Buggy code:
n = int(input())
A = list(map(int, input().split()))

for i in range(len(A)):
  if A[i] %2 == 0:
    if A[i] != 3 and A[i] != 5:
      print("DENIED")
      exit()
    else:
      pass
  else:
    pass
  
print("APPROVED")

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

for i in range(len(A)):
  if A[i] %2 == 0:
    if A[i]%3 != 0 and A[i]%5 != 0:
      print("DENIED")
      exit()
    else:
      pass
  else:
    pass
  
print("APPROVED")
Buggy code:
#!usr/bin/env python3
import sys
import math
import string
import collections
import fractions
import random
from operator import itemgetter
import itertools
from collections import deque
import copy
import heapq
import bisect

MOD = 10 ** 9 + 7
INF = float('inf')
input = lambda: sys.stdin.readline().strip()

sys.setrecursionlimit(10 ** 8)

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")
        sys.exit()
print("APPEOVED")

Fixed code:
#!usr/bin/env python3
import sys
import math
import string
import collections
import fractions
import random
from operator import itemgetter
import itertools
from collections import deque
import copy
import heapq
import bisect

MOD = 10 ** 9 + 7
INF = float('inf')
input = lambda: sys.stdin.readline().strip()

sys.setrecursionlimit(10 ** 8)

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")
        sys.exit()
print("APPROVED")
Buggy code:
N = int(input())
nums = [int(x) for x in input().split()]

approved = True
for num in nums:
    if (num%2==0):
        if (num%3!=0 and num%5!=0):
            approved = False
            print(num)
            break

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

Fixed code:
N = int(input())
nums = [int(x) for x in input().split()]

approved = True
for num in nums:
    if (num%2==0):
        if (num%3!=0 and num%5!=0):
            approved = False
            break

if(approved):
    print("APPROVED")
else:
    print("DENIED")
Buggy code:
N = int(input())
A = map(int, input().split())

a = list(filter(lambda i: i%3 != 0 and i%5 != 0 and i % 2 == 0, A)))
print("APPROVED" if len(a) == 0 else "DENIED")

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

a = list(filter(lambda i: i%3 != 0 and i%5 != 0, filter(lambda i: i % 2 == 0, A)))
print("APPROVED" if len(a) == 0 else "DENIED")
Buggy code:
import math
import time
from collections import defaultdict, deque
from sys import stdin, stdout
from bisect import bisect_left, bisect_right
n=int(input())
a=list(map(int,stdin.readline().split()))
poss=True
for i in a:
    if(i%2==0):
        if(i%3!=0 or i%5!=0):
            poss=False
            break
if(poss):
    print("APPROVED")
else:
    print("DENIED")

Fixed code:
import math
import time
from collections import defaultdict, deque
from sys import stdin, stdout
from bisect import bisect_left, bisect_right
n=int(input())
a=list(map(int,stdin.readline().split()))
poss=True
for i in a:
    if(i%2==0):
        if(i%3!=0 and i%5!=0):
            poss=False
            break
if(poss):
    print("APPROVED")
else:
    print("DENIED")
Buggy code:
input()
nums = [int(n_str) for n_str in input().split(' ')]

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

print("APPROVED")

Fixed code:
input()
nums = [int(n_str) for n_str in input().split(' ')]

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

print("APPROVED")
Buggy code:
input()
A = map(int, input().split())
for a in A:
  if A % 2 == 0:
    if A % 3 != 0 and A % 5 != 0:
      print('DENIED')
      exit()
print('APPROVED')

Fixed code:
input()
A = map(int, input().split())
for a in A:
  if a % 2 == 0:
    if a % 3 != 0 and a % 5 != 0:
      print('DENIED')
      exit()
print('APPROVED')
Buggy code:
cnt = int(input())
tar_list = list(map(int, input().split()))
flg = False
for i in range(cnt):

  if tar_list[i] % 2 == 0:
    if tar_list[i] % 3 == 0 or if tar_list[i] % 5 == 0:
    else:
      flg = True
      print("DENIED")
      break
      
if flg == False:
  print("APPROVED")

Fixed code:
cnt = int(input())
tar_list = list(map(int, input().split()))
flg = False
for i in range(cnt):

  if tar_list[i] % 2 == 0:
    if tar_list[i] % 3 == 0 or tar_list[i] % 5 == 0:
      flg = False
    else:
      flg = True
      print("DENIED")
      break
      
if flg == False:
  print("APPROVED")
Buggy code:
# -*- coding: utf-8 -*-
"""
Created on Tue Mar  3 23:44:02 2020

@author: Kanaru Sato
"""

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

deny = 0

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

if deny == 1:
    print("DENIED")
else:
    print("APRROVED")



Fixed code:
# -*- coding: utf-8 -*-
"""
Created on Tue Mar  3 23:44:02 2020

@author: Kanaru Sato
"""

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

deny = 0

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

if deny == 1:
    print("DENIED")
else:
    print("APPROVED")
Buggy code:
n = int(input())
L = list(map(int,input().split()))

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

print("APPROVRD")

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

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

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

for x in arr:
    if ((x % 2) == 0) and (x % 3 or x % 5):
        break
else:
    print("APPROVED")

print("DENIED")


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

for x in arr:
    if ((x % 2) == 0) and (x % 3 * x % 5):
        print("DENIED")
        break
else:
    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!=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:
stdin = open(0).read().split('\n')
N=int(stdin[0])
A=map(int,stdin[1].split())
flag=True
for a in A:
    if a%2==0 and a%3!=0 and a%5!=0:
        flag=False
        exit()
print('APPROVED' if flag else 'DENIED')

Fixed code:
stdin = open(0).read().split('\n')
N=int(stdin[0])
A=map(int,stdin[1].split())
flag=True
for a in A:
    if a%2==0 and a%3!=0 and a%5!=0:flag=False
print('APPROVED' if flag else 'DENIED')
Buggy code:
n=int(input())
li=list(map(int,input().split()))
even=[]
ans="APPRIVED"

for i in li:    
  if i%2==0:
    even.append(i)
    
for j in even:
  if j%3!=0 and j%5!=0:
    ans="DENIED"
print(ans)

Fixed code:
n=int(input())
li=list(map(int,input().split()))
even=[]
ans="APPROVED"

for i in li:    
  if i%2==0:
    even.append(i)
    
for j in even:
  if j%3!=0 and j%5!=0:
    ans="DENIED"
print(ans)
Buggy code:
N = input()
numList = input().split(' ')
print(numList)
for num in numList:
  num = int(num)
  if num % 2 == 0:
    judge1 = num % 3 == 0
    judge2 = num % 5 == 0
    approve = judge1 or judge2
    if not approve:
      print('DENIED')
      exit()
print('APPROVED')

Fixed code:
N = input()
numList = input().split(' ')
for num in numList:
  num = int(num)
  if num % 2 == 0:
    judge1 = num % 3 == 0
    judge2 = num % 5 == 0
    approve = judge1 or judge2
    if not approve:
      print('DENIED')
      exit()
print('APPROVED')
Buggy code:
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
import numpy as np
def main():
    a = np.fromstring(read(), np.int64, sep=' ')[1:]
    a = a[a % 2 == 0]
    if np.all((a % 3 == 0) or (a % 5 == 0)):
        print('APPROVED')
    else:
        print('DENIED')

if __name__ == '__main__':
    main()


Fixed code:
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
import numpy as np
def main():
    a = np.fromstring(read(), np.int64, sep=' ')[1:]
    a = a[a % 2 == 0]
    if np.all((a % 3 == 0) | (a % 5 == 0)):
        print('APPROVED')
    else:
        print('DENIED')

if __name__ == '__main__':
    main()
Buggy code:
n = int(input())
data = input().split()
 
ans = "APPROVED"
 
for i in range(n):
  num = int(data[i])
  if num % 2 == 0 and (num % 3 != 0 or num % 5 != 0)
    ans = "DENIED"
    break
 
print(ans)


Fixed code:
n = int(input())
data = input().split()
 
ans = "APPROVED"
 
for i in range(n):
  num = int(data[i])
  if num % 2 == 0:
    if num % 3 != 0 and num % 5 != 0:
      ans = "DENIED"
      break  
 
print(ans)
Buggy code:
n =int(input())
w = list(map(int,input().split()))
print('APPROVED')
for i in range(n):
  if w[i]%2!=0:
    continue
  else:
    if w[i]%3==0 or w[i]%5==0:
      continue
    else:
      a='DENIED'
      break
 

Fixed code:
n =int(input())
w = list(map(int,input().split()))
a='APPROVED'
for i in range(n):
  if w[i]%2!=0:
    continue
  else:
    if w[i]%3==0 or w[i]%5==0:
      continue
    else:
      a='DENIED'
      break
print(a)
Buggy code:
def solve():
    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:
                print('APPROVED')
                exit()
    print('DENIED')


if __name__ == '__main__':
    solve()


Fixed code:
def solve():
    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')


if __name__ == '__main__':
    solve()
Buggy code:
n = int(input())
a = list(map(int, input().split(" ")))
flag = True
for i in a:
  if (i%2==0):
    if not (i%3==0 or i%5==0):
      flag=False
if flag==True:
  print("APPROVED")
else:
  print("DEFINED")

Fixed code:
n = int(input())
a = list(map(int, input().split(" ")))
flag = True
for i in a:
  if (i%2==0):
    if not (i%3==0 or i%5==0):
      flag=False
if flag==True:
  print("APPROVED")
else:
  print("DENIED")
Buggy code:
n = int(input())
a = list(map(int, input().split()))
for i in range(n):
    if a[i]%2 == 1:
        continue
    else:
        if a[i]%3 == 0:
            continue
        elif a[i]%5 == 0:
            continue
        else:
            print (a[i])
            print ("DENIED")
            exit (0)
print ("APPROVED")


Fixed code:
n = int(input())
a = list(map(int, input().split()))
for i in range(n):
    if a[i]%2 == 1:
        continue
    else:
        if a[i]%3 == 0:
            continue
        elif a[i]%5 == 0:
            continue
        else:
            print ("DENIED")
            exit (0)
print ("APPROVED")
Buggy code:
n = int(input())
a = list(map(int, input().split()))
print("APPROVED" if all(i % 5 == 0 or i % 3 == 0 for i in a if i % 2 == 0 else "DENIED")

Fixed code:
n = int(input())
a = list(map(int, input().split()))
print("APPROVED" if all(i % 5 == 0 or i % 3 == 0 for i in a if i % 2 == 0) else "DENIED")
Buggy code:
n = int(input())
a = [int(x) for x in input().split()]
judge = True
for i in a:
    if i%2 == 0:
        if i%3 != 0 and i%5 != 0:
            judge = False
            break

print('APPROVED') if judge else print('DENTED')

Fixed code:
n = int(input())
a = [int(x) for x in input().split()]
judge = True
for i in a:
    if i%2 == 0:
        if i%3 != 0 and i%5 != 0:
            judge = False
            break

print('APPROVED') if judge else print('DENIED')
Buggy code:
N = int(input())
a_list = [int(x) for x in input().split(' ')]
a_list = list(filter(lambda x:x%2 == 0 and (x%3 != 0 and x%5 != 0), a_list))
print(a_list)

if not a_list:
    print('APPROVED')
else:
    print('DENIED')

Fixed code:
N = int(input())
a_list = [int(x) for x in input().split(' ')]
a_list = list(filter(lambda x:x%2 == 0 and (x%3 != 0 and x%5 != 0), a_list))

if not a_list:
    print('APPROVED')
else:
    print('DENIED')
Buggy code:
N = int(input())
A = list(map(int, input.split()))
ans = True
for i in range(N):
  if A[i] % 2 == 0:
    if A[i] % 3 != 0 or A[i] % 5 != 0:
      ans = False
if ans:
  print("APPROVED")
else:
  print("DENIED")

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

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

N = int(input())
A = tuple(map(int, input().split()))
for a in A:
    if not a % 2 and a % 3 and a % 5:
        print('DENIED')
        exit()
print('ACCEPTED')


Fixed code:
from sys import exit

N = int(input())
A = tuple(map(int, input().split()))
for a in A:
    if not a % 2 and a % 3 and a % 5:
        print('DENIED')
        exit()
print('APPROVED')
Buggy code:
n = int(input())
a = list(map(int,input().split()))
b = []
wk = wk1 = 0

for i in range(n):
    if a[i]%2 == 0:
        b.append(a[i])

for j in range(len(b)):
    if b[j]%3 == 0 or b[j]%5 == 0:
        wk1 = 1
    else:
        wk1 = 0
if wk1 == 0:
    print('DENIED')
else:
    print('APPROVED')

Fixed code:
n = int(input())
a = list(map(int,input().split()))
b = []
wk = wk1 = 0

for i in range(n):
    if a[i]%2 == 0:
        b.append(a[i])

for j in range(len(b)):
    if b[j]%3 == 0 or b[j]%5 == 0:
        wk = 1
    else:
        wk1 = 1
if wk1 == 1:
    print('DENIED')
else:
    print('APPROVED')
Buggy code:
from sys import exit

N = int(input())
A = tuple(map(int, input().split()))
for a in A:
    if a % 2 == 0:
        if not(a % 3 != 0 or a % 5 != 0):
            print('DENIED')
            exit()
print('APPROVED')


Fixed code:
from sys import exit

N = int(input())
A = tuple(map(int, input().split()))
for a in A:
    if a % 2 == 0:
        if not(a % 3 == 0 or a % 5 == 0):
            print('DENIED')
            exit()
print('APPROVED')