Problem:


Score: 200 points

Problem Statement

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.

Notes

The condition in the statement can be rephrased as "If x is an even number written on the document, x is divisible by 3 or 5".
Here "if" and "or" are logical terms.

Constraints

All values in input are integers.

1 \leq N \leq 100

1 \leq A_i \leq 1000

Input

Input is given from Standard Input in the following format:

N
A_1 A_2 \dots A_N

Output

If the immigrant should be allowed entry according to the regulation, print APPROVED; otherwise, print DENIED.

Sample Input 1

5
6 7 9 10 31

Sample Output 1

APPROVED

The even numbers written on the document are 6 and 10.

All of them are divisible by 3 or 5, so the immigrant should be allowed entry.

Sample Input 2

3
28 27 24

Sample Output 2

DENIED

28 violates the condition, so the immigrant should not be allowed entry.



Sample input:
5
6 7 9 10 31


Sample output:
APPROVED

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
li = list(map(int,input().split()))

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

Submission status: Wrong Answer

Solution code:
N=int(input())
li = list(map(int,input().split()))

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

Submission status: Wrong Answer

Solution code:
N=int(input())
li = list(map(int,input().split()))

for i in li:
  if i%2 ==0:
    if i%3 != 0 and i%5 != 0:
      print('DENIED')
      break
  continue
  print('APPROVED')

Submission status: Wrong Answer

Solution code:
n=int(input())
a=list(map(int,input().split()))
s=[]
for i in range(n):
            if a[i]%2==0:
                        s.append(a[i])
if len(s)==0:
            print('DENIED')
            exit()             
for j in range(len(s)):
           
            if s[j]%3!=0 and s[j]%5!=0:
                        print('DENIED')
                        exit()
            else:
                        print('APPROVED')
                        exit()

Submission status: Wrong Answer

Solution code:
n=int(input())
a=list(map(int,input().split()))
s=[]
for i in range(n):
            if a[i]%2==0:
                        s.append(a[i])
                        
for j in range(len(s)):
            if len(s)==0:
                        print('DENIED')
            if s[j]%3!=0 and s[j]%5!=0:
                        print('DENIED')
                        exit()
            else:
                        print('APPROVED')
                        exit()

Submission status: Wrong Answer

Solution code:
n=int(input())
a=list(map(int,input().split()))
s=[]
for i in range(n):
            if a[i]%2==0:
                        s.append(a[i])
                        
for j in range(len(s)):
            if s[j]%3!=0 and s[j]%5!=0:
                        print('DENIED')
                        exit()
            else:
                        print('APPROVED')
                        exit()

Submission status: Wrong Answer

Solution code:
n=int(input())
a=list(map(int,input().split()))
s=[]
for i in range(n):
            if a[i]%2==0:
                        s.append(a[i])
                        print(s)
for j in range(len(s)):
            if s[j]%3!=0 and s[j]%5!=0:
                        print('DENIED')
                        exit()
            else:
                        print('APPROVED')
                        exit()

Submission status: Wrong Answer

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

flag = 0

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

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

Submission status: Wrong Answer

Solution code:
N = int(input())
A_list = list(map(int, input().split()))
isDenied = False
for num in A_list:
    if num%2 == 0 and num%3 != 0 and num%5 != 0:
        print('DENIED')
        isDenied = True
 
if not isDenied:
    print('APPROVED')

Submission status: Wrong Answer

Solution code:
N = int(input())
A_list = list(map(int, input().split()))
isDenied = False
for num in A_list:
    if num %2 == 0:
        if num%3 != 0 and num%5 != 0:
            print('DENIED')
            isDenied = True
 
if not isDenied:
    print('APPROVED')

Submission status: Wrong Answer

Solution code:
N = int(input())
A_list = list(map(int, input().split()))
isDenied = False
for num in A_list:
    if num %2 == 0:
        if not (num%3 == 0 or num%5 == 0):
            print('DENIED')
            isDenied = True

if not isDenied:
    print('APPROVED')

Submission status: Wrong Answer

Solution code:
n=int(input())
a=list(map(int,input().split()))
s=0
for i in range(n):
    if a[i]%2==0 and a[i]%3!=0 and a[i]%5!=0:
        s=s+1


if s==0:
    print('APPROVED')
else:
    print('DENID')

Submission status: Wrong Answer

Solution code:
N = input()
x = input().split()

i = 0
for i in range(0,int(N)-1):
    if int(x[i])%2 is not 0:
        pass
    elif int(x[i])%3 is not 0 or int(x[i])%5 is not 0:
        print("DENIED")
        break
    else:
        print("APPROVED")
    
    i = i + 1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
A=list(map(int,input().split()))
D = 0
AP = 0
for a in A:
    if ((a % 2 == 0) & ((a % 3 != 0) & (a % 5 != 0))):
        D = 1
    if ((a % 2 == 0) & ((a % 3 == 0) | (a % 5 == 0))):
        AP = 1
if (AP == 1) & (D == 0):
    print("APPROVED")
else:
    print("DENIED")

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int, input().split()))
flag = False
for i in range(n):
    if a[i] % 2 == 0:
        if a[i] % 3 == 0 or a[i] % 5 == 0:
            flag = True
        else:
            flag = False
            break

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

Submission status: Wrong Answer

Solution code:
N = int(input())
A = input().split()
for i in range(N):
    if int(A[i])%2==0:
        if int(A[i])%15!=0:
            print("DENIED")
            exit(0)
print("APPROVED")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = input().split()
for i in range(N):
    if int(A[i])%2==0:
        if int(A[i])%15!=0:
            print("DENIED")
            break
    print("APPROVED")

Submission status: Wrong Answer

Solution code:
N = int(input())#.split()
A = input().split()
den = False
for i in range(N):
    if int(A[i]) % 2 == 0:
        if int(A[i]) % 3 != 0 and int(A[i]) % 5 != 0:
            print("DENIED")
            den = True
if not den:
    print("APPROVED")

Submission status: Wrong Answer

Solution code:
import sys
n = int(input())
a = list(map(int,input().split()))

for i in range(0,n-1):
    if a[i]%2 == 0:
        if a[i]%3 != 0 and a[i]%5 != 0:
            print("DENIED")
            sys.exit()
    
print("APPROVED")

Submission status: Wrong Answer

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

ans = 0

for i in range(n):
  if i % 2 == 0:
    if i % 3 != 0 or i % 5 != 0:
        ans += 1

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

Submission status: Wrong Answer

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

ans = 0

for i in range(n):
  if i % 2 == 0:
    if i % 3 != 0 or i % 5 != 0:
        ans += 1
    else:
      break

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

Submission status: Wrong Answer

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

ans = 0

for i in range(n):
  if i % 2 == 0:
    if i % 3 == 0 or i % 5 == 0:
      pass
    else:
      ans += 1
      break

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

Submission status: Wrong Answer

Solution code:
_=int(input())
a=list(map(int,input().split()))
bool=True
for i in a:
  if i%2==0:
    if i%3==0 or i%5==0:
      bool=False
if bool:
  print("APPROVED")
else:
  print("DENIED")

Submission status: Wrong Answer

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

#6,10の倍数になれば良い

count = 0
ok_count = 0
for i in range(len(a)):
    if a[i]%2  == 0:
        count += 1
        if a[i]%3 == 0 or a[i]%5 == 0 or a[i]%3 == 0 and a[i]%5 == 0:
            ok_count += 1
if count == ok_count:
    print('APPROVED')
else:
    print('DENIED5')

Submission status: Wrong Answer

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

#6,10の倍数になれば良い

count = 0
ok_count = 0
for i in range(len(a)):
    if a[i]%2  == 0:
        count += 1
        if a[i]%3 == 0 or a[i]%5 == 0:
            ok_count += 1
if count == ok_count:
    print('APPROVED')
else:
    print('DENIED5')

Submission status: Wrong Answer

Solution 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")

Submission status: Wrong Answer

Solution code:
N=int(input())
li = list(map(int,input().split()))

for i in li:
  if i%2 ==0:
    if i%3 != 0 or i%5 != 0:
      print('DENIED')
      break
  continue
  print('APPROVED')

Submission status: Wrong Answer

Solution code:
num = int(input().rstrip())
nums = input().rstrip().split(" ")
check = 0
for i in range(num):
  n = int(nums[int(i)])
  if n % 2 == 1:
    if n % 3 != 0 or n % 5 != 0:
      check = 1
if check == 1:
  print("DENIED")
else:
  print("APPROVED")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = [int(i) for i in input().split()]

Frag = True

for i in range(N):
    if A[i] % 2 == 1 or A[i] % 6 == 0 or A[i] % 10 == 0:
        continue
    else:
        Frag == False

if Frag == True:
    print("APPROVED")
else:
    print("DENIED")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int,input().split()))
T = True
for i in A:
    if i % 2 == 0:
        if i % 3 !=0 or i % 5 != 0:
            T = False
if T:
    print("APPROVED")
else:
    print("DENIED")

Submission status: Wrong Answer

Solution 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('APPROVED')
        break
print("DENIED")

Submission status: Wrong Answer

Solution 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('APPROVED')
        break
print("DENIED")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int,input().split()))
for i in A:
    if i % 2 == 0:
        if i % 3 !=0 and i % 5 != 0:
            print('DENIED')
        break
    else:
        print('APPROVED')

Submission status: Wrong Answer

Solution code:
n = int(input())
L = list(map(int,input().split()))
L = [x for x in L if x%2 ==0]
for i in range(len(L)):
    if (L[i]%3 == 0 or L[i]%5== 0) and L[i]%15 != 0:
        flag = True
    else:
        flag =False
        break
#print(L)
if len(L) == 0:
    print("DENIED")
    exit()
if flag:
    print("APPROVED")
else:
    print("DENIED")

Submission status: Wrong Answer

Solution code:
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:
    if on == 1:
  	   print("APPROVED")
    else:
 	   print("DENIED")

Submission status: Wrong Answer

Solution code:
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:
    if on == 1:
  	   print("APPROVED")
    else:
 	   print("DENNIED")

Submission status: Wrong Answer

Solution code:
N = int(input())
list = input().split()
for i in range(N):
  on = 0
  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:
    if on == 1:
  	   print("APPROVED")
    else:
 	   print("DENIED")

Submission status: Wrong Answer

Solution code:
N = int(input())
list = input().split()
for i in range(N):
  on = 0
  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:
    if on == 1:
  	   print("APPROVED")
    else:
 	   print("DENNIED")

Submission status: Wrong Answer

Solution code:
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")

Submission status: Wrong Answer

Solution code:
n = int(input())
 
numbers = list(map(int, input().split(' ')))
approved = False
 
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')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
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')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
n = int(input())
a = list(map(int, input().split()))

p = 'DENIED'
for i in a:
  if i % 2 == 0:
    if i % 3 == 0 or i % 5 == 0:
      p = 'APPROVED'
    else:
      print('DENIED')
      sys.exit()
print(p)

Submission status: Wrong Answer

Solution code:
import sys

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

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

print ('APPROVED')

Submission status: Wrong Answer

Solution code:
import sys

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

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

print ('APPROVED')

Submission status: Wrong Answer

Solution code:
import sys

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

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

print ('APPROVED')

Submission status: Wrong Answer

Solution code:
import sys

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

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

print ('APPROVED')

Submission status: Wrong Answer

Solution code:
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')

Submission status: Wrong Answer

Solution code:
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 = False
            break
        
if isApprove:
    print ('APPROVED')
else:
    print('DENIED')

Submission status: Wrong Answer

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

isApprove = False

for x in A:
    if x % 2 == 0:
        if (x % 3 != 0) or (x % 5 != 0):
            isApprove = False
            break
    else:
        isApprove = True

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

Submission status: Wrong Answer

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

isApprove = False

for x in A:
    if x % 2 == 0:
        if (x % 3 == 0) or (x % 5 == 0):
            isApprove = True
        else:
            isApprove = False
            break
    else:
        isApprove = False

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

Submission status: Wrong Answer

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

isApprove = False

for x in A:
    if x % 2 == 0:
        if (x % 3 == 0) or (x % 5 == 0):
            isApprove = True
        else:
            isApprove = False
            break

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

Submission status: Wrong Answer

Solution code:
x=list(map(int, input().split()))
false=0
 
for i in range(1,len(x)):
    if x[i]%2 ==0:
        if x[i]%3!=0 and x[i]%5!=0:
            false=false+1
if false!=0:
	print('APPROVED')
else:
	print('DENIED')

Submission status: Wrong Answer

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

isApprove = False

for x in A:
    if x % 2 == 0:
        if (x % 3 == 0) or (x % 5 == 0):
            isApprove = True
        else:
            isApprove = False

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

Submission status: Wrong Answer

Solution code:
x=list(map(int, input().split()))
false=0
 
for i in range(1,len(x)):
    if x[i]%2 ==0:
        if x[i]%3!=0 or x[i]%5!=0:
            false=false+1
if false!=0:
	print('APPROVED')
else:
	print('DENIED')

Submission status: Wrong Answer

Solution code:
x=list(map(int, input().split()))
false=0
 
for i in range(1,len(x)):
    if x[i]%2 ==0:
        if x[i]%3!=0 or x[i]%5!=0:
            false=1
if false==1:
	print('APPROVED')
else:
	print('DENIED')

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int,input().split()))
f = 0
t = 0

for count in A :
    if count % 2 == 0:
        if count % 3 != 0 and count %5 != 0:
            f = 1
            break

        else:
            t = 1

if f:
    print("DENIED")

elif t and not f:
    print("APPROVED")

Submission status: Wrong Answer

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

for count in A :
    if count % 2 == 0:
        if count % 3 != 0 and count %5 != 0:
            print("DENIED")

        else:
            print("APPROVED")

Submission status: Wrong Answer

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

A= [i for i in A if i%2==0]
print(A)
if len( [j for j in A if not ((j%3==0)or(j%5==0))]) == 0:
    print("APPROVED")
else:
    print("DENIED")

Submission status: Wrong Answer

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

A= [i for i in A if i%2==0]
if len( [j for j in A if not ((j%3!=0)or(j%5!=0))]) == 0:
    print("APPROVED")
else:
    print("DENIED")

Submission status: Wrong Answer

Solution code:
n = int(input())
nums = [int(i) for i in input().split(" ")]

approved = True
for num in nums:
  if num%2 == 0:
    approved = (num%3 == 0) or (num%5 == 0)
if approved:
  print('APPROVED')
else:
  print('DENIED')

Submission status: Wrong Answer

Solution code:
n = int(input())
nums = [int(i) for i in input().split(" ")]

approved = True
for num in nums:
  if num%2 == 0:
    approved = (num%3 == 0) & (num%5 == 0)
if approved:
  print('APPROVED')
else:
  print('DENIED')

Submission status: Wrong Answer

Solution code:
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] % 5 == 0):
        print('APPROVED')
    else:
        print('DENIED')

Submission status: Wrong Answer

Solution code:
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]%5 == 0):
        print('APPROVED')
    else:
        print('DENIED')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

for A in range(n):
    if A == A/3 or A == A/5:
        print("APPROVED")
    else:
        print("DENIED")

Submission status: Wrong Answer

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

lst=0
  
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')

Submission status: Wrong Answer

Solution code:
N=int(input())
A=list(map(int,input().split()))
lis=[]
flag=1

for i in A:
  if i%2==0:
    lis.append(i)
    
for j in lis:
  if j%3!=0 and j%5!=0:
    flag=0
print("DENIED"if flag==0 else "APPROVE")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
input()
a = [int(x) for x in input().split()]
b=[]
for i in a:
    if (i%2==0) and (i%3==0 or i%5==0):
        num = 1
        b.append(num)
    else:
        num = 0
        b.append(num)

if sum(b)> 0:
    print("APPROVED")
else:
    print("DENIED")

Submission status: Wrong Answer

Solution code:
n = int(input())
lists = list(map(int,input().split()))
flg = True
for check in lists:
    if(check % 2 == 0):
        if(check & 3 == 0 or check % 5 == 0):
            print('APPROVED')
            flg = False
if(flg == True):
  print('DENIED')

Submission status: Wrong Answer

Solution code:
input()
a = [int(x) for x in input().split()]

for i in a:
    if (i%2==0) and (i%3==0 or i%5==0):
        num = True
    else:
        num = False

if num == True:
    print("APPROVED")
else:
    print("DENIED")

Submission status: Wrong Answer

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

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

    
if count!=0:
  print('DENIED')
else:
  print('APPROVED')

Submission status: Wrong Answer

Solution code:
input()
a = [int(x) for x in input().split()]
    
for i in a:
  B = i%2
  if B==0:
    print(i)
    if (i%3==0 or i%5==0) and i>=6:
      print("APPROVED")
    else:
      print("DENIED")
  else:
    print("DENIED")

Submission status: Wrong Answer

Solution code:
input()
a = [int(x) for x in input().split()]
    
for i in a:
  B = i%2
  if B==0:
    print(i)
    if i%3 == i%5 and i>=6:
      print("APPROVED")
    else:
      print("DENIED")
  else:
    print("DENIED")

Submission status: Wrong Answer

Solution code:

import numpy as np
 
N = int(input())
A = list(map(int, input().split()))
 
even_list = []
 
found_one=False
 
for r in A:
    if r%2==0 and (r%3==0 or r%5==0):
        even_list.append(r)

for r in even_list:
    if r%3==0 or r%5==0:
        found_one=True
    else:
        print('DENIED')
        found_one = False
        break

if found_one:
    print('APPROVED')

Submission status: Wrong Answer

Solution code:
import numpy as np

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

even_list = []

found_one=False

for r in A:
    if r%2==0 and (r%3==0 or r%5==0):
        found_one=True
    elif r%2==1:
        continue
    else:
        print('DENIED')
        break

if found_one:
    print('APPROVED')

Submission status: Wrong Answer

Solution code:
def check(number):
    if number % 2 == 1:
        return True
    if number % 3 == 0 or number % 5 == 0:
        return True
    return False


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

flag = True

for num in array:
    if check(num) is False:
        flag = False
        break

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

Submission status: Wrong Answer

Solution code:
def check(number):
    if number % 2 == 1:
        return True
    if number % 3 == 0 and number % 5 == 0:
        return True
    return False


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

flag = True

for num in array:
    if check(num) is False:
        flag = False
        break

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

Submission status: Wrong Answer

Solution code:
N=int(input())
z=[int(x) for x in input().split()]
y=[x for x in z if x//2==0]
a=[a for a in y if (a//3==0 or a//5==0)]
if len(y)==len(a):
    print('APPROVED')
else:
    print('DENIED')

Submission status: Wrong Answer

Solution code:
o = int(input())
a = list(map(int,input().split()))

b,c = 0,0
for i in a:
    if (i%2)==0:
        b += 1
        if(i%3 == 0) or (i%5 == 0):
            c += 1

if (b == c) and (b != 0):
    print('APPROVED')
else:
    print('DENIED')

Submission status: Wrong Answer

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

b,c = 0,0
for i in a:
    if (i%2)==0:
        b += 1
        if(i%3 == 0) or (i%5 == 0):
            c += 1

if (b == c) and (b != 0):
    print('APPROVED')
else:
    print('DENIED')

Submission status: Wrong Answer

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

b,c = 0,0
for i in a:
    if (i%2)==0:
        b += 1
        if(i%3 == 0) or (i%5 == 0):
            c += 1

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

Submission status: Wrong Answer

Solution code:
N = int(input())

a = input().split()
aa = 0
for i in range(N):
    t = int(a[i])
    if t%2 == 0:
        if not (t%3 == 0 or t%5 ==0):
            print("DENIED")
            aa = 1

if aa != 1:
    print("APPROVED")

Submission status: Wrong Answer

Solution code:
n=int(input())
l=list(map(int,input().split()))
for i in l:
    if i%2==0 and i%3!=0 and i%5==0:
        print("DENIED")
        exit()
print("APPROVED")

Submission status: Wrong Answer

Solution code:
n=int(input())
l=list(map(int,input().split()))
for i in l:
    if i%2==0 and i%3!=0 or i%5==0:
        print("DENIED")
        exit()
print("APPROVED")

Submission status: Wrong Answer

Solution code:
n = input()
a = list(map(int,input().split()))
ans = 'APPROVED'
 
for i in a:
  if i % 2 == 0:
    if i % 3 != 0:
      ans = 'DENIED'
      break
    elif i % 5 != 0:
      ans = 'DENIED'
      break
 
 
print(ans)

Submission status: Wrong Answer

Solution code:
import numpy as np

N = int(input())
l = list(map(int,input().split()))
a = np.array(l)
count = 0

for i in range(len(a)):
    if a[i]%2 == 0:
        if a[i]%3 == 0 or a[i]%5== 0:
            count += 1

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

Submission status: Wrong Answer

Solution code:
import numpy as np
 
N = int(input())
l = list(map(int,input().split()))
a = np.array(l)
count = 0
 
for i in range(len(a)):
    if a[i]%6 == 0 or a[i]%10 == 0:
        count += 1
    
if count:
    print("APPROVE")
else:
    print("DENIED")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = input().split()
A = [int(i) for i in A]
t = 0
for i in range(N-1):
  if A[i] % 2 == 0:
    if A[i]%3 != 0 and A[i]%5 != 0:
      t += 1
    else:continue
  else:continue
if t == 0:
  print("APPROVED")
else:
  print("DENIED")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = input().split()
A = [int(i) for i in A]
t = 0
for i in range(N-1):
  if A[i] % 2 == 0:
    if A[i]%3 !=0 and A[i]%5 != 0:
      t += 1
if t == 0:
  print("APPROVED")
else:
  print("DENIED")

Submission status: Wrong Answer

Solution code:
number = int(input())
a = list(map(int, input().split()))

k=0
for i in a:
    if i%2 is 0:
        if i%3 or i%5 is 0:
            k=0
        else:
            k=1

if k is 1:
    print("DENIED")
else:
    print("APPROVED")