Problem: You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria.  According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied:    * All even numbers written on the document are divisible by 3 or 5.  If the immigrant should be allowed entry according to the regulation, output `APPROVED`; otherwise, print `DENIED`.

Submission attempts (in order):
a = 3
b = [1,2,3]
x = 0

if (a==0) :
	print('DENIED')
elif (b.count(0) > 0):
	print('DENIED')
else:
  for i in b:
      if i % a == 0:
          x += 1
  if x == len(b):
      print('APPROVED')
  else:
      print('DENIED')


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:
          x += 1

a = int(input())
 
b=list(map(int, input().split())) 
x = 0
c = 0

for t in b:
  if (t%2==0):
    c += 1;
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 == c:
  print('APPROVED')
else :
  print('DENIED')


a = int(input())
 
b=list(map(int, input().split())) 
x = 0
c = 0
    
for i in b:
  if (i % a == 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')



a = int(input())
 
b=list(map(int, input().split())) 
x = 0
c = 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

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

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


a = int(input())

b=[]
for i in range(a):
	b.append(int(input()))
x = 0
 
if (a==0) :
	print('DENIED')
elif (b.count(0) > 0):
	print('DENIED')
else:
  for i in b:
      if i % a == 0:
          x += 1
  if x == len(b):
      print('APPROVED')

a = int(input())
b=[]
b.append(int(input()))
x = 0
 
if (a==0) :
	print('DENIED')
elif (b.count(0) > 0):
	print('DENIED')
else:
  for i in b:
      if i % a == 0:
          x += 1
  if x == len(b):
      print('APPROVED')
  else:

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:
          x += 1
  if x == len(b):
    print('APPROVED')
  else:
    print('DENIED')
		

a = int(input())
b = map(int, input().split())
x = 0

for i in b:
	if i % a == 0:
		x += 1
if x == len(b):
	print('APPROVED')
else:
	print('DENIED')

a = int(input())
b = 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:
          x += 1
  if x == len(b):
      print('APPROVED')
  else:
      print('DENIED')


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:
          x += 1
if x == len(b):
  print('APPROVED')
else :
  print('DENIED')

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

a = int(input())
b = input()
x = 0

if (a==0) :
	print('DENIED')
elif (b.count(0) > 0):
	print('DENIED')
else:
  for i in b:
      if i % a == 0:
          x += 1
  if x == len(b):
      print('APPROVED')
  else:
      print('DENIED')

a = int(input())
b = int(input())
x = 0
 
if (a==0) :
	print('DENIED')
elif (b.count(0) > 0):
	print('DENIED')
else:
  for i in b:
      if i % a == 0:
          x += 1
  if x == len(b):
      print('APPROVED')
  else:
      print('DENIED')

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Accepted