ZhenlongDai/ACPR huggingface dataset:
Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
i = int(input())
i2 = list(map(int, input().split()))
    
new_list = []
for i in range(i):
  if i2[i] % 2 == 0:
    if i2[i] % 3 == 0 or i2[i] % 5 == 0:
        new_list.append('APPROVED')
    else:
        new_list.append('DENEID')
    break
    
if (all(str == 'APPROVED' for str in new_list)):
	print('APPROVED')
else:
  	print('DENIED')
 

Failing test case input:
5
0 -3 5 2 266

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
i1 = int(input())
i2 = list(map(int, input().split()))
    
l = []
for i in range(i1):
  if i2[i] % 2 == 0:
    if i2[i] % 3 == 0 or i2[i] % 5 == 0:
        l.append('APPROVED')
    else:
        l.append('DENEID')
    
if (all(str == 'APPROVED' for str in l)):
	print('APPROVED')
else:
  	print('DENIED')

Problem: p02772
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))
for i in a:
    if i%2 == 0:
        if not i%3==0 or not i%5==0:
            print("DENIED")
            exit()
print("APPROVED")

Failing test case input:
3
0 1 100

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int, input().split()))
for i in a:
    if i%2 == 0:
        if not (i%3==0 or i%5==0):
            print("DENIED")
            exit()
print("APPROVED")

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
N = int(input())
A = [int(i) for i in input().split()]
for i in A:
  if i%2 == 0 and (not i%3 == 0 or not i % 5 == 0):
    print("DENIED")
    sys.exit()
  else :
    continue
print("APPROVED")

Failing test case input:
3
1 1 42

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
import sys
N = int(input())
A = [int(i) for i in input().split()]
for i in A:
  if i%2 == 0 and (not i%3 == 0 and not i % 5 == 0):
    print("DENIED")
    sys.exit()
  else :
    continue
print("APPROVED")

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys

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

isApprove = True

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

print ('APPROVED')

Failing test case input:
3
0 1 010

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
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')
Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = list(map(int, input().split()))
A_even = [i for i in A if i % 2 == 0]
flag_list = list(map(lambda x: (x % 3 == 0) or (x % 5 == 0), A_even))
print(flag_list)
print('APPROVED' if False not in flag_list else 'DENIDE')

Failing test case input:
5
0 -5 17 4 538

Expected output:
DENIED


Actual output:
[True, False, False]
DENIDE


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int, input().split()))
A_even = [i for i in A if i % 2 == 0]
flag_list = list(map(lambda x: (x % 3 == 0) or (x % 5 == 0), A_even))
print('APPROVED' if False not in flag_list else 'DENIED')

Problem: p02772
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
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")

Failing test case input:
3
0 1 100

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
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")

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = [int(i) for i in input().split()]
f = True
for i in a:
    if i % 2:
        continue
    elif i % 3 != 0 or i % 5 != 0:
        f = False
        break

print('APPROVED' if f else 'DENIED')


Failing test case input:
3
1 0 010

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
n = int(input())
a = [int(i) for i in input().split()]
f = True
for i in a:
    if i % 2:
        continue
    if i % 3 and i % 5:
        f = False
        break

print('APPROVED' if f else 'DENIED')

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,*a=map(int,open(0).read().split())
e=[i for i in a if i%2==0]
if e:
    for j in e:
        if j%3==0 or j%5==0:
            continue
        else:
            print('DENIED')
            break
    else:
        print('APPROVED')
else:
    print('DENIED')

Failing test case input:
3
-1 1 101

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
n,*a=map(int,open(0).read().split())
e=[i for i in a if i%2==0]
if e:
    for j in e:
        if j%3!=0 and j%5!=0:
            print('DENIED')
            break
    else:
        print('APPROVED')
else:
    print('APPROVED')
Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
a=list(map(int,input().split()))
ans="DENIED"

for i in a:
    if i%2==0:
        if i%3==0 or i%5==0:
            ans="APPROVED"
        else:
            ans="DENIED"
            break
    else:
        continue
        
print(ans)

Failing test case input:
5
-1 -1 1 1 337

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
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:
            ans="APPROVED"
        else:
            ans="DENIED"
            break
    else:
        continue
        
print(ans)

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
list = input().split()
for i in range(N):
  on = 0
  k = int(list[i])
  print(i)
  if k % 2 == 0:
    if k % 3 == 0 or k % 5 == 0:
      on = 1 
    else:
      print("DENIED")
      break
  if i == N-1:
    if on == 1:
  	   print("APPROVED")
    else:
 	   print("DENNIED")

Failing test case input:
3
2 8 16

Expected output:
DENIED


Actual output:
0
DENIED


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

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = input()
raw_input1 = input()

l = raw_input1.split()
l_num = [int(x) for x in l]

flag = 0
flag1 = 0

for a in l_num:
    if a % 2 ==0:
        if a % 3 == 0 or a % 5 == 0:
            flag = 0
        else:
            flag = 1
    if flag != 0:
        break

if flag == 0:
    print('APPROVAL')
else:
    print('DENIED')

Failing test case input:
3
1 0 110

Expected output:
APPROVED


Actual output:
APPROVAL


Fixed submission (verdict: Accepted):
N = input()
raw_input1 = input()

l = raw_input1.split()
l_num = [int(x) for x in l]

flag = 0
flag1 = 0

for a in l_num:
    if a % 2 ==0:
        if a % 3 == 0 or a % 5 == 0:
            flag = 0
        else:
            flag = 1
    if flag != 0:
        break

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

Problem: p02772
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
N=int(input())
list1=[]
list2=[]
for i in map(int,input().split()):
    if i % 2 == 0:
        list1.append(i)
    if i % 2 == 0 and i % 3 == 0 or i % 5 ==0:
        list2.append(i)
if list1 == list2:
    print('APPROVED')
else:
    print('DENIED')

Failing test case input:
5
0 0 5 1 252

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
N=int(input())
list1=[]
list2=[]
for i in map(int,input().split()):
    if i % 2 == 0:
        list1.append(i)
    if i % 2 == 0 and (i % 3 == 0 or i % 5 ==0):
        list2.append(i)
if list1 == list2:
    print('APPROVED')
else:
    print('DENIED')
Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=int(input())
b=list(map(int,input().split()))
for i in range(a):
  if b[i]%2==0:
    
    if b[i]%3==0 or b[i]%5==0:
      pass
    else:
      print('DENIED')
      break
  else:
    pass
print('APPROVED')
    


Failing test case input:
5
0 -2 5 1 266

Expected output:
DENIED


Actual output:
DENIED
APPROVED


Fixed submission (verdict: Accepted):
import sys
a=int(input())
c=0
b=list(map(int,input().split()))
for i in range(a):
  if b[i]%2==0:
    
    if b[i]%3==0 or b[i]%5==0:
      pass
    else:
      print('DENIED')
      sys.exit()
  else:
    c+=1
    pass
print('APPROVED')

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
An = list(map(int,input().split()))

for i in An:
    if i%2==0:
        if i%3 !=0 and i%5==0:
            print('DENIED')
            exit()
else:
    print('APPROVED')


Failing test case input:
3
2 26 47

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
N = int(input())
An = list(map(int,input().split()))

for i in An:
    if i%2==0:
        if i%3 !=0 and i%5!=0:
            print('DENIED')
            exit()
else:
    print('APPROVED')

Problem: p02772
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n=input()
a=list(map(int,input().split()))
for i in a:
    if i%2!=0:
        continue
    elif i%2==0:
        if i%3!=0 and i%5!=0:
            print('DENIED')
            break
    else:
        continue
print('APPROVED')
        

Failing test case input:
5
1 1 4 5 32

Expected output:
DENIED


Actual output:
DENIED
APPROVED


Fixed submission (verdict: Accepted):
n=input()
a=list(map(int,input().split()))
result='APPROVED'
for i in a:
    if i%2==0:
        if i%3!=0 and i%5!=0:
            result='DENIED'
            break
print(result)

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):



s = [input() for i in range(2)]
N = int(s[0])
As = sorted(list(s[1].split()))


pp = "APPROVED"

for i in range(0,N-1):
	if int(As[i]) % 2 == 0 :
		if (int(As[i]) % 3)*(int(As[i]) % 5) == 0 :
			continue
		else:
			pp = "DENIED"
			break
		

print(pp)

Failing test case input:
3
2 0 110

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):



s = [input() for i in range(2)]
N = int(s[0])
As = sorted(list(s[1].split()))


pp = "APPROVED"

for i in range(0,N):
	if (int(As[i]) % 2) == 0 :
		if (As[i] == 2)or(As[i] == 4):
			pp = "DENIED"
			break			
		elif (int(As[i]) % 3)*(int(As[i]) % 5) == 0 :
			continue
		else:
			pp = "DENIED"
			break
		

print(pp)
Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))
ans = []
for i in range(n):
    if a[i] % 2 == 0:
        if a[i] % 3 == 0 or a[i] % 5 == 0:
            ans.append(1)
        else:
            ans.append(-1)
if len(set(ans)) == 1:
    print('APPROVED')
else:
    print('DENIED')

Failing test case input:
5
2 1 5 5 46

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int, input().split()))
ans = [1]
for i in range(n):
    if a[i] % 2 == 0:
        if a[i] % 3 == 0 or a[i] % 5 == 0:
            ans.append(1)
        else:
            ans.append(-1)
if len(set(ans)) == 1:
    print('APPROVED')
else:
    print('DENIED')

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))
for i in a:
    if i % 2 == 1:
        continue
    if i % 3 == 0 or i % 5 == 0:
        continue
    print("DENIED")
print("APPROVED")

Failing test case input:
3
4 5 69

Expected output:
DENIED


Actual output:
DENIED
APPROVED


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int, input().split()))
for i in a:
    if i % 2 == 1:
        continue
    if i % 3 == 0 or i % 5 == 0:
        continue
    print("DENIED")
    exit()
print("APPROVED")

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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 all(ans):
    print('APPROVED')
else:
    print('DENIED')
    

Failing test case input:
5
6 7 9 10 31

Expected output:
APPROVED

Actual output:
DENIED


Fixed submission (verdict: Accepted):
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')

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
c=list(map(int,input().split()))
flag=0
for i in range(N):
    if c[i]%2==0:
        if c[i]%3==0 or c[i]%5==0:
            flag=1
        else:
            flag=0
            print("DENIED")
            exit(0)

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

Failing test case input:
5
-1 -1 1 1 337

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
N=int(input())
c=list(map(int,input().split()))

for i in range(N):

    if c[i]%2==0:
        if c[i]%3==0 or c[i]%5==0:
            continue

        else:
            print("DENIED")
            exit(0)

print("APPROVED")
Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = int(input())
 
b=list(map(int, input().split())) 
x = 0
 
if (a==0) :
	print('DENIED')
elif (b.count(0) > 0):
	print('DENIED')
else:
  for i in b:
      if (i % a == 0) and (i % 2 == 0):
          x += 1
if x == len(b):
  print('APPROVED')
else :
  print('DENIED')

Failing test case input:
3
0 2 101

Expected output:
DENIED


Actual output:
DENIED
DENIED


Fixed submission (verdict: Accepted):
a = int(input())
 
b=list(map(int, input().split())) 
x = 0
c = 0
    
for i in b:
  if ((i % 3 == 0) or (i % 5 == 0)) and (i % 2 == 0):
    x += 1

for t in b:
  if (t%2==0):
    c += 1;

if x == c:
  print('APPROVED')
else :
  print('DENIED')

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
A=list(map(int,input().split()))
even=[]
for a in A:
    if a%2==0:
        even.append(a)
    else:
        print("APPROVED")
        exit()

ans=False
        
for e in even:
    if e%3==0 or e%5==0:
        ans=True
    else:
        break

print("APPROVED" if ans else "DENIED")

Failing test case input:
3
2 5 69

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
N=int(input())
A=list(map(int,input().split()))
even=[]
for a in A:
    if a%2==0:
        even.append(a)
    
if len(even)==0:
    print("APPROVED")
    exit()
    
ans=False
    
for e in even:
    if e%3==0 or e%5==0:
        ans=True
    else:
        ans=False
        break

print("APPROVED" if ans else "DENIED")

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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")

Failing test case input:
3
1 8 42

Expected output:
DENIED


Actual output:
8
DENIED


Fixed submission (verdict: Accepted):
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")

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
amount = int(input())
inputl = input().split()

flag = True

for i in range(0, amount-1):
    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")


Failing test case input:
5
-1 -1 1 1 374

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
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")
Problem: p02772
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
a = list(map(int,input().split()))
for i in range(len(a)):
  if a[i] %2 == 0 and (a[i] % 3 != 0 or a[i] %5!= 0):
    print("DENIED")
    break
  else:
    print("APPROVED")
    break

Failing test case input:
5
0 -5 9 4 538

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int,input().split()))
denied = False
for i in range(len(a)):
  if a[i] % 2 == 0:
    if (a[i] % 3 != 0 and a[i] % 5 != 0) :
      print ("DENIED")
      denied = True
      break
      
if not denied :
  print ("APPROVED")

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
l = list(map(int, input().split()))
cnt = 0
for i in l:
    if i % 6 == 0 or i % 10 == 0:
        cnt += 1
if cnt == n:
    print("APPROVED")
else:
    print("DENIED")


Failing test case input:
3
-1 1 101

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
n = int(input())
l = list(map(int, input().split()))
count = 0
cnt = 0
for j in l:
    if j % 2 == 0:
        count += 1
for i in l:
    if i % 6 == 0 or i % 10 == 0:
        cnt += 1
if cnt == count:
    print("APPROVED")
else:
    print("DENIED")

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
A=list(map(int,input().split()))
a=[]
for i in range(N):
  if A[i]%2==0:
    a.append(A[i])
for j in range(len(a)):
  if a[j]%3==0 or a[j]%5==0:
    continue
    j+=1
  else:
    print('DENIED')
    break
print('APPROVED')


Failing test case input:
3
1 8 42

Expected output:
DENIED


Actual output:
DENIED
APPROVED


Fixed submission (verdict: Accepted):
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:
      pass
    else:
      count+=1
if count==0:
  print('APPROVED')
else:
  print('DENIED')

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
a=list(map(int,input().split()))
f=0
for i in range(n):
    if(a[i]%2==0):
        if(a[i]%3==0 or a[i]%5==0):
            f=0
        else:
            f=1
            break
if(f==0):
    print("APROVED")
else:
    print("DENIED")

Failing test case input:
3
0 0 100

Expected output:
APPROVED


Actual output:
APROVED


Fixed submission (verdict: Accepted):
n=int(input())
a=list(map(int,input().split()))
f=0
for i in range(n):
    if(a[i]%2==0):
        if(a[i]%3==0 or a[i]%5==0):
            f=0
        else:
            f=1
            break
if(f==0):
    print("APPROVED")
else:
    print("DENIED")
Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
items = [int(x) for x in input().split()]

flg = False
for item in items:
  if item % 2 == 0:
    if item % 3 == 0 or item % 5 == 0:
      flg = True
    else:
      flg = False
      break

if flg:
  print('APPROVED')
else:
  print('DENIED')

Failing test case input:
3
-1 1 101

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
n = int(input())
items = [int(x) for x in input().split()]
 
flg = True
for item in items:
  if item % 2 == 0:
    if item % 3 == 0 or item % 5 == 0:
      flg = True
    else:
      flg = False
      break
 
if flg:
  print('APPROVED')
else:
  print('DENIED')

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
flag=True
nums=list(map(int, input().split()))
for x in nums:
  if x%2:
    continue
  else:
    if x%3==0 and x%5==0:
      continue
    else:
      flag=False
      break
if flag:
  print("APPROVED")
else:
  print("DENIED")
  

Failing test case input:
3
1 0 110

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
N=int(input())
flag=True
nums=list(map(int, input().split()))
for x in nums:
  if x%2:
    continue
  else:
    if x%3==0 or x%5==0:
      continue
    else:
      flag=False
      break
if flag:
  print("APPROVED")
else:
  print("DENIED")

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
li = list(map(int,input().split()))
flag = False
for i in li:
  if i % 2 == 0:
    if i % 3 == 0 or i % 5 == 0:
      continue
    else:
      print("DENIED")
      flag = True
if not flag:
  print("APPROVED")

Failing test case input:
5
-4 -1 1 4 374

Expected output:
DENIED


Actual output:
DENIED
DENIED
DENIED


Fixed submission (verdict: Accepted):
n = int(input())
l = list(map(int,input().split()))
flag = False
for i in l:
  if i%2==0:
    if i%3!=0 and i%5!=0:
      flag=True
      break
if not flag:
  print('APPROVED')
else:
  print('DENIED')

Problem: p02772
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

n = int(input())
a = list(map(int, input().split()))
ans = 0
ant = 0
for i in range(n):
    if a[i] % 2 == 0:
        ant += 1
        if a[i] % 3 == 0:
            ans += 1
        elif a[i] % 5 == 0:
            ans += 1

if ant == ans:
    if ant > 0:
        print("APPROVED")
    else:
        print("DENIED")
else:
    print("DENIED")


Failing test case input:
3
-1 1 101

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):


n = int(input())
a = list(map(int, input().split()))
ans = 0
ant = 0
b = []
for i in range(n):
    if a[i] % 2 == 0:
        ant += 1
        b.append(int(a[i]))
        if a[i] % 3 == 0:
            ans += 1
        elif a[i] % 5 == 0:
            ans += 1

if ant == ans:
    if ant > 0:
        print("APPROVED")
    else:
        print("APPROVED")
else:
    print("DENIED")
Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))

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


Failing test case input:
5
-2 -1 1 1 385

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int, input().split()))

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

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N =int(input())
Alist=list(map(int,input().split()))

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

Failing test case input:
3
1 1 100

Expected output:
APPROVED


Actual output:

Fixed submission (verdict: Accepted):
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")

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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'
    else:
        ans = 'DENIED'
        break
print(ans)

Failing test case input:
3
0 1 011

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
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)

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())

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

for i in range(N):
    a=A[i]
    if a%2==0 and (a%3!=0 or a%5!=0):
        print("DENIED")
    
    break

print("APPROVED")

Failing test case input:
5
-1 7 4 10 31

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
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")

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
arr = list(map(int, input().split()))

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



Failing test case input:
3
1 1 010

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
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")
Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
none = input()
a = input().split()
a = list(map(int,a))
final = []
string = ""
for i in a:
   if i % 2 == 0:
      final.append(i)
for i in final:
   if i % 3 == 0 or i % 5 == 0:
      string = "APPROVED"
   else:
      string = "DENIED"
      break
print(string)


Failing test case input:
5
-1 -1 1 1 385

Expected output:
APPROVED


Actual output:

Fixed submission (verdict: Accepted):
N = int(input())
is_approved = True
l = list(map(int, input().split()))
for i in l:
    if i % 2 == 0:
        if not (i % 5 == 0 or i % 3 == 0):
            is_approved = False
            break
print('APPROVED' if is_approved else 'DENIED')

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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")


Failing test case input:
3
0 1 101

Expected output:
APPROVED


Actual output:
APROVED


Fixed submission (verdict: Accepted):
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")

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

n = input() 
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
      break
if count >= 1 or check == 0:
  print('APPROVED')
else:
  print('DENIED')

Failing test case input:
5
0 -5 9 4 538

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):

n = input() 
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')

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
 
numbers = list(map(int, input().split(' ')))
approved = False
 
for num in numbers:
  if (num % 2 == 0) and ((num % 3 == 0) or (num % 5 == 0)):
    approved = True
    continue
  else:
    approved = False
    print('DENIED')
    break
if approved:
  print('APPROVED')

Failing test case input:
3
-1 0 100

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
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')
Problem: p02772
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
a = list(map(int,input().split()))
cnt=0
for i in range(n):
    if a[i]%2==0:
        if a[i]%3==0:
            pass
        elif a[i]%5==0:
            pass
        else:
            cnt+=1
if cnt==0:
    print("APPROVED")
else:
    print(cnt)
    print("DENIED")

Failing test case input:
5
1 2 4 5 46

Expected output:
DENIED


Actual output:
3
DENIED


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int,input().split()))
cnt=0
for i in range(n):
    if a[i]%2==0:
        if a[i]%3==0:
            pass
        elif a[i]%5==0:
            pass
        else:
            cnt+=1
if cnt==0:
    print("APPROVED")
else:
    
    print("DENIED")

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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')

Failing test case input:
5
1 1 4 5 46

Expected output:
DENIED


Actual output:
DENIED
DENIED
APPROVED


Fixed submission (verdict: Accepted):
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')

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))
b = []
c = []
flag = False

for i in a:
    if i % 2 == 0:
        b.append(i)

for s in b:
    if s % 3 == 0 or s % 5 == 0:
        c.append(True)
    else:
        c.append(False)
for z in c:

    if not z:
        print("DENIED")
        break
    else:
        print("APPROVED")
        break


Failing test case input:
5
0 -5 5 2 538

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int, input().split()))
b = []
c = []

for i in a:
    if i % 2 == 0:
        b.append(i)

for s in b:
    if s % 3 == 0 or s % 5 == 0:
        c.append(True)

if len(b) == len(c):
    print("APPROVED")
else:
    print("DENIED")

Problem: p02772
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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 or A[i]%5 == 0:
      print('APPROVED')
      sys.exit()
print('DENIED')

Failing test case input:
5
2 0 5 5 132

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
import sys
N = int(input())
A = list(map(int,input().split()))
count = 0
frag = 0
for i in range(N):
  if A[i]%2 == 0:
    count = count+1
    if A[i]%3 == 0 or A[i]%5 == 0:
      frag = frag+1
if frag == count:
  print('APPROVED')
else:
  print('DENIED')
Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    N = int(input())
    A = list(map(int,input().split()))
    i = 0
    s = ""
    while i < N:
        if A[i] % 2 == 0:
            if (A[i] % 3) == 0 or (A[i] % 5) == 0:
                s += "a"
            else:
                s += "d"
        i += 1
    if s in "d":
        print("APPROVED")
    else:
        print("DENIED")
main()

Failing test case input:
3
28 27 47

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
def main():
    N = int(input())
    A = list(map(int,input().split()))
    i = 0
    while i < N:
        if A[i] % 2 == 0:
            if (A[i] % 3) != 0 and (A[i] % 5) != 0:
                return("DENIED")
                break
        i += 1
    return("APPROVED")
print(main())

Problem: p02772
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
a=list(map(int,input().split()))
for i in range(n):
  if (a[i]%2==0 and a[i]%3==0) or (a[i]%2==0 and a[i]%5==0):
    print('APPROVED')
    exit()
  else:
    print('DENIED')
    exit()

Failing test case input:
5
-1 -1 1 1 385

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
n=int(input())
a=list(map(int,input().split()))
for i in range(n):
  if a[i]%2==0 and (a[i]%3!=0 and a[i]%5!=0):
    
    print('DENIED')
    exit()
print('APPROVED')

Problem: p02772
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
lst = list(map(int,input().split()))
c = 0
for i in range(n):
  if (lst[i]%2 == 0):
    if (lst[i]%3 == 0 or lst[i]%5 == 0):
      c = 1
if (c == 0):
  print("APPROVED")
else:
  print("DENIED")


Failing test case input:
5
-2 -1 1 1 385

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
n = int(input())
lst = list(map(int,input().split()))
c = 0
for i in range(n):
  if (lst[i]%2 == 0):
    if (lst[i]%3 != 0 and lst[i]%5 != 0):
      c = 1
if (c == 0):
  print("APPROVED")
else:
  print("DENIED")

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int,input().split()))
flag = 0

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


Failing test case input:
5
6 7 3 10 31

Expected output:
APPROVED


Actual output:
DENIED
DENIED
DENIED
APPROVED


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int,input().split()))
flag = 1

for i in a:
  if i % 2 == 0:
    if i % 3 == 0 or i % 5 == 0:
      flag = 1
    else:
      flag = 0
      break
  
if flag == 1:
  print('APPROVED')
else:
  print('DENIED')
Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = input()
A = list(map(str, input().split()))
B=[]
C=[]
l=[]
m=[]
i=0
for a in range(int(N)):
    if int(A[a])%2==0:
       B.append(A[a])
       i=i+1
print(B)
for a in range(int(i)):
    if not int(B[a])%3==0 or int(B[a])%5==0:
       C=1
    else:
       C=0
print(C)
if C==1:
   print("DENIED")
else:
   print("APPROVED")

Failing test case input:
5
-2 -1 1 1 189

Expected output:
DENIED


Actual output:
['-2']
1
DENIED


Fixed submission (verdict: Accepted):
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")

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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))

Failing test case input:
3
1 8 25

Expected output:
DENIED


Actual output:
DEFINED


Fixed submission (verdict: Accepted):
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))

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int,input().split()))
ok = True
for x in a:
    if x %2 == 0:
        if x %3!=0 and x %5 != 0:
            ok = False
            break
if ok:
    print("APPROVED")
else:
    print("DENINED")
    

Failing test case input:
3
2 2 43

Expected output:
DENIED


Actual output:
DENINED


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int,input().split()))
ok = True
for x in a:
    if x %2 == 0:
        if x %3!=0 and x %5 != 0:
            ok = False
            break
if ok:
    print("APPROVED")
else:
    print("DENIED")

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = (int(x) for x in input().split())
for num in a:
  if num%6 != 0 and num % 10 != 0:
    print('DENIED')
    exit()
print('APPROVED')

Failing test case input:
3
0 1 011

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
n = int(input())
a = list((int(x) for x in input().split()))
for num in a:
  if num%2 == 0:
    if num%3 != 0 and num%5 != 0:
      print('DENIED')
      exit()
print('APPROVED')
Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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

Failing test case input:
3
1 8 42

Expected output:
DENIED


Actual output:

Fixed submission (verdict: Accepted):
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)

Problem: p02772
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N = int(input())
*A, = map(int, input().split())
B = []
for i in A:
  if i % 2 == 0:
    B.append(i)
C = 0
for l in B:
  if l % 3 == 1 or l % 5 == 0:
    C += C + 1
  else:
    C += C + 2
if C/N ==1:
  print('APPR0VED')
else:
  print('DENIED')

Failing test case input:
5
6 7 3 10 31

Expected output:
APPROVED


Actual output:
APPR0VED


Fixed submission (verdict: Accepted):
N = int(input())
*A, = map(int, input().split())
B = []
C = 0
for i in A:
  if i % 2 == 0:
    B.append(i)
    if i % 5 == 0 or i % 3 == 0:
      C += 1
 
if C == len(B):
  print('APPROVED')
else:
  print('DENIED')

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
data=list(map(int,input().split()))
ans="APPROVE"
for i in range(N):
    mo2=data[i]%2
    mo6=data[i]%6
    mo10=data[i]%10
    if mo2==0:
        if mo6==0 or mo10==0:
            ans="APPROVED"

        else:
            ans="DENIED"
            break
    else:
        continue
print(ans)

Failing test case input:
5
-1 -1 1 1 337

Expected output:
APPROVED


Actual output:
APPROVE


Fixed submission (verdict: Accepted):
N=int(input())
data=list(map(int,input().split()))
ans="APPROVED"
for i in range(N):
    mo2=data[i]%2
    mo6=data[i]%6
    mo10=data[i]%10
    if mo2==0:
        if mo6==0 or mo10==0:
            ans="APPROVED"

        else:
            ans="DENIED"
            break
    else:
        continue
print(ans)

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))

for i in range(n):
    if a[i] % 30 != 0:
        print('DENIED')
        exit()
print('APPROVED')


Failing test case input:
3
1 1 42

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int, input().split()))

for i in range(n):
    if a[i] % 2 == 1:
        continue
    if a[i] % 3 != 0 and a[i] % 5 != 0 :
        print('DENIED')
        exit()
print('APPROVED')
Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = input()
A = map(int,(input().split()))

for n in A:
    if (n % 2 == 1) or (n % 6 == 0) or (n % 10 == 0):
        print('APPROVED')
    else:
        print('DENIED')

Failing test case input:
5
1 1 4 5 32

Expected output:
DENIED


Actual output:
APPROVED
APPROVED
DENIED
APPROVED
DENIED


Fixed submission (verdict: Accepted):
N = input()
A = map(int,(input().split()))

output = 'APPROVED'
for n in A:
    if (n % 2 == 0) and (n % 6 != 0) and (n % 10 != 0):
        output = 'DENIED'
        
print(output)

Problem: p02772
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
A = list(map(int, input().split()))
print("APPROVED" if any(a%2 & a%3==0 | a%5==0 for a in A) else "DENIED")

Failing test case input:
5
-1 -1 0 4 374

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
input()
A=list(map(int,input().split()))
print("APPROVED" if all(a&1 or a%3==0 or a%5==0 for a in A) else "DENIED")

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
check=list(map(int,input().split()))
f=0
for i in range(n):
    if check[i]%2==0:
        if check[i]%3!=0 or check[i]%5!=0:
            f=1
                
if f==1:
    print("DENIED")
else:
    print("APPROVED")

Failing test case input:
3
1 0 010

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
n=int(input())
check=list(map(int,input().split()))
f=0
for i in range(n):
    if check[i]%2==0:
        if check[i]%3!=0 and check[i]%5!=0:
            f=1
                
if f==1:
    print("DENIED")
else:
    print("APPROVED")

Problem: p02772
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n = int(input())
A = list(map(int, input().split()))

ans = 'APPROVED'
for a in A:
  if a%1 == 0:
    continue
  else:
    if a%3 == 0:
      continue
    elif a%5 == 0:
      continue
    else:
      ans = 'DENIED'
      
print(ans)

Failing test case input:
5
2 0 5 1 252

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
n = int(input())
A = list(map(int, input().split()))
 
ans = 'APPROVED'
for a in A:
  if a%2 == 1:
    continue
  else:
    if a%3 == 0:
      continue
    elif a%5 == 0:
      continue
    else:
      ans = 'DENIED'
      break
      
print(ans)

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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')


Failing test case input:
3
2 8 16

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
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')
Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
A = list(int(x) for x in input().split())

text = 'APPROVED'
for count in range(n):
    if(A[count] % 2 == 0):
        if(count % 3 != 0 and count % 5 != 0):
            text = 'DENYED'
            break

print(text)


Failing test case input:
3
2 2 110

Expected output:
DENIED


Actual output:
DENYED


Fixed submission (verdict: Accepted):
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)

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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('APPROVE')

Failing test case input:
3
1 0 100

Expected output:
APPROVED


Actual output:
APPROVE


Fixed submission (verdict: Accepted):
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')

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


n = input()
a_list = list(map(int, input().split(' ')))
 
result = 'DENIED'
 
for a in a_list:
    if a%2 == 0 and (a%3 == 0 or a%5 == 0):
        result = 'APPROVED'
    elif a%2 == 0:
        result = 'DENIED'
        break
 
print(result)

Failing test case input:
5
-1 -1 1 1 337

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):


n = input()
a_list = list(map(int, input().split(' ')))
 
result = 'APPROVED'
 
for a in a_list:
    if a%2 == 0 and (a%3 != 0 and a%5 != 0):
        result = 'DENIED'
        break
 
print(result)

Problem: p02772
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
a = list(map(int,input().split()))
for i in range(len(a)):
  if a[i] %2 == 0 and a[i] % 3 != 0 and a[i] %5!= 0:
    print("DENIED")
    break
  else:
    print("APPROVED")
    break

Failing test case input:
5
1 1 5 5 46

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int,input().split()))
denied = False
for i in range(len(a)):
  if a[i] % 2 == 0:
    if (a[i] % 3 != 0 and a[i] % 5 != 0) :
      print ("DENIED")
      denied = True
      break
      
if not denied :
  print ("APPROVED")

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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) or (x % 5 != 0)):
        print('DENIED')
        sys.exit()

print ('APPROVED')

Failing test case input:
5
1 1 4 10 31

Expected output:
DENIED


Actual output:
[5]
[1, 1, 4, 10, 31]
DENIED


Fixed submission (verdict: Accepted):
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')
Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys

As = [int(n) for n in input().split()]

for A in As:
    if A % 2 == 0:
        if not(A % 3 == 0 or A % 5 == 0):
            print('DENIED')
            sys.exit(0)

print('APPROVED')


Failing test case input:
3
2 0 100

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
import sys
N = input()
As = [int(n) for n in input().split()]

for A in As:
    if A % 2 == 0:
        if not(A % 3 == 0 or A % 5 == 0):
            print('DENIED')
            sys.exit(0)

print('APPROVED')

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n =int(input())

A = [0 for x in input().split() 
     if int(x) % 2 == 1 or int(x) % 6 == 0 or int(x) % 10 == 0 ]
if not A:
    print("DENIED")
else:
    print("APPROVED")

Failing test case input:
3
2 8 25

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
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")

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

n = int(input())
a = list(map(int, input().split()))
num = []

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

if len(num) == 0:
    print('DENIED')
    exit()
else:
    for j in range(0, len(num)):
        if num[j] % 3 != 0 and num[j] % 5 != 0:
            print('DENIED')
            exit()

print('APPROVED')

Failing test case input:
5
-1 -1 1 1 337

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):

n = int(input())
a = list(map(int, input().split()))
num = []

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



if len(num) == 0:
    print('APPROVED')
    exit()
else:
    for j in range(0, len(num)):
        if num[j] % 3 != 0 and num[j] % 5 != 0:
            print('DENIED')
            exit()

print('APPROVED')