qyliang/CodeNanoFix huggingface dataset:
Buggy code:
def ApproveOrDeny(number_list):
  for num in number_list:
    if num % 2 == 0:
      if num % 3 != 0:
        return 'DENIED'
      if num % 5 != 0:
        return 'DENIED'
  return 'APPROVED'

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

Fixed code:
def ApproveOrDeny(number_list):
  for num in number_list:
    if num % 2 == 0:
      if num % 3 != 0 and num % 5 != 0:
        return 'DENIED'
  return 'APPROVED'
 
N = int(input())
number_list = list(map(int, input().split()))
print (ApproveOrDeny(number_list))
Buggy code:
N = int(input())
A = list(map(int,input().split()))

ans = 'APPROVED'
for i in A:
    if i % 2 == 0:
        if i % 3 == 0:
            ans = 'APPROVED'
        if i % 5 == 0:
            ans = 'APPROVED'
        else:
            ans = 'DENIED'
            break
print(ans)

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

ans = 'APPROVED'
for i in A:
    if i % 2 == 0:
        if i % 3 == 0 or i % 5 == 0:
            pass
        else:
            ans = 'DENIED'
print(ans)
Buggy code:
n=int(input())
a=list(map(int,input().split()))
for i in a:
  if not i%2==0 and (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 and (i%3!=0 and i%5!=0):
    print("DENIED")
    exit()
print("APPROVED")
Buggy 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")


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

for i in an:
  if i % 2 == 0 and i % 3 != 0 and i % 5 != 0:
    print('DENIED')
    exit()
    
print('APPROVED')
Buggy code:
n=int(input())
x=list(map(int,input().split()))
f=False
for i in range(n):
  if x[i]%2==0:
    if x%3==0 or x%5==0:
      pass
    else:
      f=True
      break
      
if f==False:
  print('APPROVED")
else:
        print('DENIED')


Fixed code:
n=int(input())
x=list(map(int,input().split()))
f=False
for i in range(n):
  if x[i]%2==0:
    if x[i]%3==0 or x[i]%5==0:
      pass
    else:
      f=True
      break
      
if f==False:
  
  print('APPROVED')
else:
        print('DENIED')
Buggy code:
import sys
N = int(input())
arr = list(map(int, input().split()))

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


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

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

print("APPROVED")
Buggy code:
'''
    Auther: ghoshashis545 Ashis Ghosh
    College: jalpaiguri Govt Enggineerin College
    Date:24/03/2020
'''

def main():
    
    # for _ in range(ii()):
    n=int(input())
    a=list(map(int,input().split()))
    f=0
    for i in a:
        if(i%2==0);
            if(i%3!=0 or i%5!=0):
                f=1
                break
    if(f):
        print('DENIED')
    else:
        print('APPROVED')
        
















    
    
if __name__ =="__main__":
    main()

Fixed code:
'''
    Auther: ghoshashis545 Ashis Ghosh
    College: jalpaiguri Govt Enggineerin College
    Date:24/03/2020
'''

def main():
    
    # for _ in range(ii()):
    n=int(input())
    a=list(map(int,input().split()))
    f=0
    for i in a:
        if(i%2==0):
            if(i%3!=0 and i%5!=0):
                f=1
                break
    if(f):
        print('DENIED')
    else:
        print('APPROVED')
        
















    
    
if __name__ =="__main__":
    main()
Buggy code:
A=list(map(int,input().split()))
B,C=[],[]
for i in (A):
    if i%2==0:B.append(i)
for i in (B):
    if i%3==0 or i%5==0:C.append(i)
if len(B)==len(C):
    print('APPROVED')
else:print('DENIED')


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

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

Fixed code:
n = int(input())
a = [int(i) for i in input().split() if int(i) % 2 == 0]
for i in a:
    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
for i in a:
  if i % 2 == 0:
    if not i % 3 == 0 or i % 5 == 0:
      ans = False
      break
if ans:
  print('APPROVED')
else:
  print('DENIED')

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

flag = True

for i in range(0, amount-1):
    a = int(inputl[i])
    print(a)
    if a % 2 == 0:
        if a % 3 != 0 and a % 5 != 0:
            flag = False

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


Fixed code:
amount = int(input())
inputl = input().split()

flag = True

for i in range(amount):
    a = int(inputl[i])
    if a % 2 == 0:
        if a % 3 != 0 and a % 5 != 0:
            flag = False

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

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

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

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

chk = 0
for i in range(0,N):
    if A[i]%2 == 0:
        if A[i]%3 == 0 or A[i]%5 == 0:
            continue
        else:
            chk += 1

if chk == 0:
    print("APROVED")
else:
    print("DENIED")

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

chk = 0
for i in range(0,N):
    if A[i]%2 == 0:
        if A[i]%3 == 0 or A[i]%5 == 0:
            continue
        else:
            chk += 1

if chk == 0:
    print("APPROVED")
else:
    print("DENIED")
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 and l[i] % 5 != 0:
            ans = 'DENIED'
            break
ans = 'APPROVED'
print(ans)


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 and l[i] % 5 != 0:
            print('DENIED')
            exit()
print('APPROVED')
Buggy code:
N=int(input())
A=[int(x) for x in input().split()]
guu=[]

result="APPROVED"
for i in range(N):
    if A[i]%2==0:
        guu.append(A[i])
for i in range(len(guu)):
    if (guu[i]%3!=0)and(A[i]%5!=0):
            result="DENIED"
            break

print(result)

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

result="APPROVED"
for i in range(N):
    if A[i]%2==0:
        guu.append(A[i])
for i in range(len(guu)):
    if (guu[i]%3!=0)and(guu[i]%5!=0):
            result="DENIED"
            break

print(result)
Buggy code:
N = int(input())
A = [int(s) for s in input().rstrip().split(' ')]
k = 1
for i in range(N):
  if A[i] % 2 == 0:
    if A[i] % 3 != 0 or A[i] % 5 != 0:
      k = 0
if k == 1:
  print("APPROVED")
elif k == 0:
  print("DENIED")

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

Fixed code:
N=int(input())
list=list(map(int,input().split()))
flg=0
for i in(list):
  if(i%2==0):
    if(i%3!=0 and i%5!=0):
      flg=1
      break
if(flg==0):
  print('APPROVED')
else:
  print('DENIED')
Buggy code:
li = list(map(int,input().split()))
error = 0
for i in range(li[0]):
  if i == 1:
  else:
    if li[i]%2 == 0:
      if li[i]%3 == 0 or li[i]%5 ==0:
      else:
        error = 1:
    else:
if error:
  print('DENIED')
else:
  print('APPROVED')

Fixed code:
n = int(input())
li = list(map(int,input().split()))
error = 0
for i in range(n):
  if li[i]%2 == 0:
    if li[i]%3 == 0 or li[i]%5 == 0:
      pass
    else:
      error = 1
  else:
    pass
if error:
  print('DENIED')
else:
  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 and i % 5 !=0:
            print('DENIED')
            break
print('APPROVED')

Fixed code:
N = int(input())
A= list(map(int,input().split()))
c = 0
for i in A:
    if i % 2 == 0:
        if i % 3 !=0 and i % 5 !=0:
            print('DENIED')
            break
    c += 1
if (N == c):
    print('APPROVED')
Buggy code:
N = int(input())
a = list(map(int, input()))
r = 'APPROVED'
for i in range(N):
  if a[i] % 2 ==0:
    if a[i] % 3 != 0 and a[i] % 5 != 0:
      r = 'DENIED'
      break
print(r)

Fixed code:
N = int(input())
a = list(map(int, input().split()))
r = 'APPROVED'
for i in range(N):
  if a[i] % 2 ==0:
    if a[i] % 3 != 0 and a[i] % 5 != 0:
      r = 'DENIED'
      break
print(r)
Buggy code:

vals = input().split(" ")
vals = map(int, vals)

bol = True

for val in vals :
	if val % 2 == 0 :
	  if not (val % 3 == 0 or val % 5 == 0) :
	    bol = False

if bol :
  print("APPLOVE")
else : 
  print("DENIED")
	

Fixed code:
input()

vals = input().split(" ")
vals = map(int, vals)

bol = True

for val in vals :
	if val % 2 == 0 :
	  if not (val % 3 == 0 or val % 5 == 0) :
	    bol = False

if bol :
  print("APPROVED")
else : 
  print("DENIED")
Buggy code:
n=int(input())
flag=0

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

for i in range(n):
	if(a[i]%2==0):
		if(a[i]%3!=0 & a[i]%5!=0):
			flag=1

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

Fixed code:
n=int(input())
flag=0

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):
			flag=1

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

for a in aa:
    if n % 2 == 0 and not (n % 3 == 0 or n % 5 == 0):
        print("DENIED")
        exit(0)
print("APPROVED")

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

for a in aa:
    if a % 2 == 0 and not (a % 3 == 0 or a % 5 == 0):
        print("DENIED")
        exit(0)
print("APPROVED")
Buggy code:
def main():
  ls = list(map(int, input().split(' ')))
  for item in ls:
    if item % 2 == 0:
      if (item % 3) * (item % 5) != 0:
        print('DENIED')
        break
  else:
    print('APPROVED')


if __name__ == '__main__':
  main()

Fixed code:
def main():
  n = input()
  ls = list(map(int, input().split(' ')))
  for item in ls:
    if item % 2 == 0:
      if (item % 3) * (item % 5) != 0:
        print('DENIED')
        break
  else:
    print('APPROVED')
 
 
if __name__ == '__main__':
  main()
Buggy code:
n = int(input())
numbers = input().split()
for i in range(n):
    n = int(numbers[i])
    if n % 3 != 0 and n % 5 != 0:
        print('DENIED')
        exit()
print('APPROVED')

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

ans = 'APPROVED'
for i in range(N):
  if N[i] % 2 == 0:
    if N[i] % 3 != 0 or N[i] % 5 != 0:
      ans = 'DENIED'
      break
      
print(ans)

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

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

for i in range(N):
    print(i)
    if A_list[i] % 2 == 0:
        if A_list[i] % 3 == 0 or A_list[i] % 5 == 0:
            if i == N-1:
                print("APPROVED")
            continue
        else:
            print("DENIED")
            exit()


Fixed code:
N = int(input())

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

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

if i == N-1:
    print("APPROVED")
Buggy code:
n=int(input())
l=list(map(int,input().split()))
c=0
for i in range(n):
    if l[i]%2==0:
        if l[i]%3!=0 and l[i]%5!=0:
            print("DENITED")
            c=1
            break
if c!=1:
    print("APPROVED")

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

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:
rangeNum = int(input())
n = list(map(int, input().split()))

for ni in range(rangeNum):
    if n[ni] % 2 == 0:
        if n[ni] % 3 == 0:
            print("APPROVED")
        elif n[ni] % 5 == 0:
            print("APPROVED")
        else:
            print("DENIED")
    else:
        print("DENIED")

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

for ni in range(rangeNum):
    if n[ni]%2 == 0:
        if n[ni]%3 == 0:
            continue
        elif n[ni]%5 == 0:
            continue
        else:
            print("DENIED")
            exit()
    else:
        continue
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 and a[i]%5==0:
            print("APPROVED")
            exit()
print("DENIED")

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

for i in range(n):
    if a[i]%2==0:
        if not(a[i]%3==0 or a[i]%5==0):
            print('DENIED')
            exit()
print('APPROVED')
Buggy code:
X = [int(x) for x in input().split()]

N = X[0]
X = X[1:]

Y = [x for x in X if x%2 == 0]

Z = [y for y in Y if y%3 != 0 and y%5 != 0]

print(Z)

if len(Z) == 0:
    print("APPROVED")
else:
    print("DENIED")

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

Y = [x for x in X if x%2 == 0]

Z = [y for y in Y if y%3 != 0 and y%5 != 0]

if len(Z) == 0:
    print("APPROVED")
else:
    print("DENIED")
Buggy code:
n=int(input())
a=list(map(int,input().split()))


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

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


ans="APPROVED"
for i in range(n):
  if a[i] % 2 == 0:
    if a[i] % 3 == 0 or a[i]%5 == 0:
      continue
    else:
      ans = "DENIED"
      
print(ans)
Buggy code:
_len = int(input())
nums = input().split(" ")

def isApprove(_len, nums):
  for i in range(_len):
    if int(nums[i]) % 2 == 0:
      if int(nums[i]) % 3 == 0 or int(nums[i]) % 5 == 0:
        return True
  
  return False

print('APPROVED' if isApprove(_len, nums) else 'DENIED')

Fixed code:
_len = int(input())
nums = input().split(" ")

def isApprove(_len, nums):
  for i in range(_len):
    if int(nums[i]) % 2 == 0:
      if int(nums[i]) % 3 != 0 and int(nums[i]) % 5 != 0:
        return False
  
  return True

print('APPROVED' if isApprove(_len, nums) else 'DENIED')
Buggy code:
N = int(input())
A = [int(i) for i in input().split()]
flag = True
for i in range(N):
    if i % 2 == 0 and (i % 3 == 0 or i % 5 == 0):
        continue
    else:
        flag = False

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

Fixed code:
N = int(input())
A = [int(i) for i in input().split()]
flag = True
for i in range(N):
    if A[i] % 2 == 0:
        if A[i] % 3 == 0 or A[i] % 5 == 0:
            continue
        else:
            flag = False
            break

if flag:
    print("APPROVED")
else:
    print("DENIED")
Buggy code:
def main():
    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')
    
    else:
        print('APPROVED')


if __name__ == '__main__':
    main()



Fixed code:
def main():
    n = int(input())

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

    for i in a:
        if i % 2 == 0:
            if i % 3 != 0:
                if i % 5 != 0:
                    print('DENIED')
                    break
    
    else:
        print('APPROVED')


if __name__ == '__main__':
    main()
Buggy code:
n = int(input())
a = list(map(int,input().split()))
k = 0

for i in range(n):
    if a[i]%2 == 0:
        if a[i]%3 != 0 or a[i]%5 != 0:
            print("DENIED")
            k += 1
            break
        else:
            continue
    else:
        continue

if k == 0:
    print("APPROVED")

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

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

if k == 0:
    print("APPROVED")
else:
  print("DENIED")
Buggy code:
a=int(input())
b=list(map(int,input().split())
c=[i for i in b if i%2==0]
d=len(c)
e=[j for j in c if i%3==0 or i%5==0]
f=len(e)
if d==f:
       print('APPROVED')
else:
       print('DENIED')

Fixed code:
a=int(input())
b=list(map(int,input().split()))
c=[i for i in b if i%2==0]
d=len(c)
e=[j for j in c if j%3==0 or j%5==0]
f=len(e)
if d==f:
       print('APPROVED')
else:
       print('DENIED')
Buggy code:
N = int(input())
num_list = list(map(int, input().split()))
 
a=0
for i in num_list:
  if i%2==0 and (i%3!=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:
n = int(input())
a = list(map(int,input().split()))
ans = 0

for i in a:
  if i%2 ==0 and (i%3 ==0 or i%5 == 0):
    ans += 1
  else:
    pass
  
if ans >0:
  print("APPROVED")
else:
  print("DENIED")

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

for i in a:
  if i%2 ==0 and (i%3 !=0 and i%5 != 0):
    ans += 1
  else:
    pass
  
if ans >0:
  print("DENIED")
else:
  print("APPROVED")
Buggy code:
n = int(input())
 
numbers = list(map(int, input().split(' ')))
approved = False
 
for num in numbers[1::2]:
  if (num % 3 == 0) or (num % 5 == 0):
    approved = True
    continue
  else:
    approved = False
    print('DENIED')
    break
if approved:
  print('APPROVED')

Fixed code:
n = int(input())
 
numbers = list(map(int, input().split(' ')))
approved = True
 
for num in numbers:
  if (num % 2 == 0):
    if (num % 3 == 0) or (num % 5 == 0):
      approved = True
      continue
    else:
      approved = False
      print('DENIED')
      break
if approved:
  print('APPROVED')
Buggy code:
N = int(input())
li = [int(i) for i in input().split()]

is_approved = True
for l in li :
    if (l % 2 != 0) :
        continue

    if (l % 2 == 0 and l % 3 == 0 and l % 5 == 0) :
        continue

    is_approved = False
    break

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



Fixed code:
N = int(input())
li = [int(i) for i in input().split()]

is_approved = True
for l in li :
    if (l % 2 != 0) :
        continue

    if (l % 3 == 0 or l % 5 == 0) :
        continue

    is_approved = False
    break

if (is_approved) :
    print("APPROVED")
else :
    print("DENIED")
Buggy code:
def f(n: int) -> bool:
    if n % 2 == 0:
        if n % 3 == 0 or n % 5 == 0:
            return True
        else:
            return False
    else:
        return True


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

if all(map(f, A)):
    print("APPROVED")
else:
    print("DINED")


Fixed code:
def f(n: int) -> bool:
    if n % 2 == 0:
        if n % 3 == 0 or n % 5 == 0:
            return True
        else:
            return False
    else:
        return True


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

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

Fixed code:
N = int(input())
A = list(map(int,input().split()))
num = [i for i in A if i % 2 == 0]
count = 0
for i in num:
    if i % 3 != 0 and i % 5 != 0:
        print('DENIED')
        count = 1
        break
if count == 0:
    print('APPROVED')
Buggy code:
N = int(input())
A = list(map(int,input().split()))
li = []
ans = "APPROVED"

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

for i in li:
  if i % 5 == 0 or i % 3 == 0:
    ans = "APPROVED"
  else:
    ans = "DENIED"
    break

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

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

for i in li:
  if i % 5 == 0 or i % 3 == 0:
    ans = "APPROVED"
  else:
    ans = "DENIED"
    break
print(ans)
Buggy code:
ans = 'APROVED'

N = int(input())
A = input().split()

for i in range(N):
    if (int(A[i])%2 == 0) and (int(A[i])%3 != 0) and (int(A[i])%5 != 0):
        ans = 'DENIED'
        break

print(ans)


Fixed code:
ans = 'APPROVED'

N = int(input())
A = input().split()

for i in range(N):
    if (int(A[i])%2 == 0) and (int(A[i])%3 != 0) and (int(A[i])%5 != 0):
        ans = 'DENIED'
        break

print(ans)
Buggy code:
N = int(input())
A = list(map(int,input().split()))
B = list((i for i in A if i % 2 == 0))

count = 0

for i in B:
    if i%3 == 0 or i%5 == 0:
        count += 1

if count == len(B):
    print("APROVED")
else:
    print("DENIED")


Fixed code:
N = int(input())
A = list(map(int,input().split()))
B = list((i for i in A if i % 2 == 0))
 
count = 0
 
for i in B:
    if i%3 == 0 or i%5 == 0:
        count += 1
 
if count == len(B):
    print("APPROVED")
else:
    print("DENIED")
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:
            continue
        else:
            print("DENIED")
            quit()


print("APROVED")

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


print("APPROVED")