TnT/Multi_CodeNet4Repair huggingface dataset:
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):
N = int(input())
A = list(map(int, input().split()))
for i in range(len(A)):
  if i%2 == 0:
    if i%3 != 0 and i%5 != 0:
      A[i] = 0
if 0 in A:
  print('DENIED')
else:
  print('APPROVED')

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

Verdicts: Wrong Answer

Accepted
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):
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('APPROVED')
      exit()

print('DENIED')  

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

print('APPROVED')

Verdicts: Wrong Answer

Accepted
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):
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")

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

Verdicts: Wrong Answer

Accepted
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):
N = int,input()

count = 0
for i in range (1,N+1):
  if i % 3 == 0 or i % 5 == 0:
    count += i
  print(count)

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

Verdicts: Runtime Error

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

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

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

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

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

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




Verdicts: Wrong Answer

Accepted
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):
n = int(input())
A = list(map(int, input().split()))
A = [a for a in A if a % 2 == 0]
print(A)

ans = "APPROVED"
for a in A:
    if (a % 3 != 0) and (a % 5 != 0):
        ans = "DENIED"
        break
print(ans)

n = int(input())
A = list(map(int, input().split()))
A = [a for a in A if a % 2 == 0]

ans = "APPROVED"
for a in A:
    if (a % 3 != 0) and (a % 5 != 0):
        ans = "DENIED"
        break
print(ans)

Verdicts: Wrong Answer

Accepted
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):
i=input;N=i();print('ADPEPNRIOEVDE'[True in[a%3and a%5and a%2==0for a in list(map(int,i().split()))]::2])

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


for i in range(N):
    a = A[i]
    if a % 2 == 0:
        if a % 3 != 0 and a % 5 != 0:
            print('DENIED')
            exit()
print('APPROVED')


Verdicts: Wrong Answer

Accepted
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):
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")


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

else:
    print("APPROVED")


Verdicts: Wrong Answer

Accepted
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):
N = int(input())
A = list(map(int, input().split()))

ans = "APPROVED"
for a in A:
    if (a % 2 == 0) and (a & 3 != 0) and (a % 5 != 0):
        ans = "DENIED"
        break

print(ans)

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

ans = "APPROVED"
for a in A:
    if (a % 2 == 0) and (a % 3 != 0) and (a % 5 != 0):
        ans = "DENIED"
        break

print(ans)

Verdicts: Wrong Answer

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

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

Verdicts: Wrong Answer

Accepted
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):
n = int(input())
arr = []
arr = input().split() 
arr = [int(l) for l in arr]
even = [l for l in arr if l % 2 == 0]      
count = 0
for i in even: 
    if i % 3 == 0 or i % 5 == 0:
        count += 1
if count == 1: 
    print("APPROVED")
else: 
    print("DENIED")

n = int(input())
arr = []
arr = input().split() 
arr = [int(l) for l in arr]
even = [l for l in arr if l % 2 == 0]      
answer = []
for i in even: 
    if i % 3 == 0 or i % 5 == 0:
        answer.append(True)
if len(answer) == len(even): 
    print("APPROVED")
else: 
    print("DENIED")

Verdicts: Wrong Answer

Accepted
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):
n=int(input())
a=[int(i) for i in input().split()]
count=0
for i in a:
    if i%2==0:
        if i%3!=0 or i%5!=0:
            count+=1
            break
if count==0:
    print("APPROVED")
else:
    print("DENIED")
            



n=int(input())
a=[int(i) for i in input().split()]
count=0
for i in a:
    if i//2==0:
        if i//3!=0 or i//5!=0:
            count+=1
            break
if count==0:
    print("APROVED")
else:
    print("DENIED")
            



n=int(input())
a=[int(i) for i in input().split()]
count=0
for i in a:
    if i%2==0:
        if i%3!=0 or i%5!=0:
            count+=1
            break
if count==0:
    print("APROVED")
else:
    print("DENIED")
            



n=int(input())
a=[int(i) for i in input().split()]
count=0
for i in a:
    if i%2==0:
        if i%3!=0 and i%5!=0:
            count+=1
            break
if count==0:
    print("APPROVED")
else:
    print("DENIED")
            



Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

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

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


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

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


Verdicts: Runtime Error

Accepted
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):
N=int(input())
A=map(int, input().split())
for i in range(N):
  if A[i]%2==0:
    if A[i]%3==0 or A[i]%5==0:
      print('APPROVED')
      exit()

print('DENIED')    

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

Verdicts: Runtime Error

Accepted
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):
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 if A[i] % 5 == 0:
            pass
        else:
            flag = 1
            break
        
 if flag = 0:
    print("PASS")
 else:
    print("DENIED")

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 if A[i] % 5 == 0:
            pass
        else:
            flag = 1
            break
    if flag = 0:
        print("PASS")
    else:
        print("DENIED")

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:
      pass
    else:
      flag = 1
      break
if flag == 0:
  print("APPROVED")
else:
  print("DENIED")

Verdicts: Runtime Error

Runtime Error

Accepted
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):
n=int(input())
arr=input.split()
den=0
app=0
for i in arr:
  i=int(i)
  if (i%2):
    if i%3==0 or i%5==0:
      app+=1
    else:
      den+=1
if den>0:
  print("DENIED")
else:
  print("APPROVED")

n = int(input()) 
  
# input the array 
# arr = []
arr = list(map(int, input().split()))
den=0
app=0
for i in arr:
    i=int(i)
    if (i%2==0):
        if i%3==0 or i%5==0:
            app+=1
        else:
            den+=1
            break

if den>0:
  print("DENIED")
else:
  print("APPROVED")

Verdicts: Runtime Error

Accepted
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):
N = int(input())

a = [int(i) for i in range(N)]

x=[]
for i in range(N):

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




N = int(input())

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

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



N = int(input())

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

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

if v == j:
  print("APPROVED")
else:
  print("DENIED")





Verdicts: Runtime Error

Wrong Answer

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

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

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

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

Verdicts: Wrong Answer

Accepted
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):
N = int(input())
A = list(map(int,input().split()))
for a in A:
  if a % 2 == 0:
    if a % 3 != 0 and a % 3 != 0:
      print("DENIED")
      break
else:
  print("APPROVED")

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


Verdicts: Wrong Answer

Accepted
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):
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:
            continue
        else:
            print('DENIED')
            exit()
print('APPROVED')

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

Verdicts: Wrong Answer

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

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

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

for i in a:
    if not i%2 and i%3 and i%5:
        print("DENIED")
        break
    else:
        print("APPROVED")

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

for i in a:                     
    if i % 2 == 0:
        if i % 3 and i % 5:
            print('DENIED')
            exit(0)
else:
    print('APPROVE')

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

for i in a:                     
    if i % 2 == 0:
        if i % 3 and i % 5:
            print('DENIED')
            exit()
else:
    print('APPROVE')

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

for i in a:
    if i % 2 == 0:
        if i % 3 and i % 5 :
            print("DENIED")
            exit(0)

print("APPROVED")

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
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):
import sys
N=int(input())
A=list(map(int,input().split()))
flag=True
for i in range(N):
    if A[i]%2==0:
        if A[i]%3!=0 or A[i]%5!=0:
            flag=False
if flag==True:
    print('APPROVED')
else:
    print('DENIED')

import sys
N=int(input())
A=list(map(int,input().split()))
flag=True
for i in range(N):
    if A[i]%2==0:
        if A[i]%3!=0 or A[i]%5!=0:
            flag=False
if flag==True:
    print('APPROVED')
else:
    print('DENIED'

import sys
N=int(input())
A=list(map(int,input().split()))
flag=True
for i in range(N):
    if A[i]%2==0:
        if A[i]%3!=0:
            flag=False
        elif A[i]%5!=0:
            flag=False
if flag==True:
    print('APPROVED')
else:
    print('DENIED')

import sys
N=int(input())
A=list(map(int,input().split()))
flag=True
for i in range(N):
    if A[i]%2==0:
        if A[i]%3!=0 and A[i]%5!=0:
            flag=False
if flag==True:
    print('APPROVED')
else:
    print('DENIED')

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

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

flg = True
for i in range(n):
  if a[i]%2 == 0:
    cnt += 1
    if a[i]%3 == 0 or a[i]%5 == 0:
      pass
    else:
      flg = False
if flg: print("APPROVED")
else: print("DENIED")

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

flg = True
for i in range(n):
  if a[i]%2 == 0:
    if a[i]%3 == 0 or a[i]%5 == 0:
      pass
    else:
      flg = False
if flg: print("APPROVED")
else: print("DENIED")

Verdicts: Runtime Error

Accepted
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):
n = int(input())
q = list(map(int,input().split()))
alm = 0
for i in q:
  if i%2 == 0:
    alm = i
  	if alm%3 != 0 or alm%5 != 0:
    	print("DENIED")
        exit()

print("APPROVED")
  


n = int(input())
q = list(map(int,input().split()))
alm = 0
for i in q:
  ans = []
  if i%2 == 0:
    ans.append(i)
  	if ans[0]%3 != 0 or ans[0]%5 != 0:
    	print("DENIED")
        exit()
    ans.pop(0)

print("APPROVED")
  

n = int(input())
q = list(map(int,input().split()))
ans = 0
count = 0
for i in q:
    if i%2 == 0:
        alm = i
        count += 1
        if alm%3 == 0 or alm%5 == 0:
            ans += 1
if ans == count:
    print("APPROVED")
else:
    print("DENIED")

Verdicts: Runtime Error

Runtime Error

Accepted
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):
import sys
N = int(input())
A = [int(i) for i in input().split()]
for i in A:
  if not i%3 == 0 or not i % 5 == 0:
    print("DENIED")
    sys.exit()
  else :
    continue
print("APPROVED")

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

N=input();print('DENIED'if any([x%2==0 and(x%3andx%5)for x in map(int,input().split())])else'APPROVED')

N=int(input())
print('DENIED' if any([x%2==0 and (x%3 and x%5) for x in int(input().split())]) else 'APPROVED')

a=int(input())
b=list(map(int,input().split()))(A1,A2...AN)
t=0
for i in b:
	if x % 2 ==0 and x % 3 != 0 and x % 5 != 0:
		t=t+1
if t>0:
	print('DENIED')
else:
	print('APPROVED')

N = int(input())
A = [int(i) for i in input().split()]
for i in A:
  if not i%3 == 0 or not i % 5 == 0:
    print("DENIED")
    exit()
  else :
    continue
print("APPROVED")

a=int(input())
b=list(map(int,input().split()))(A1,A2...AN)
t=0
for i in A:
	if x % 2 ==0 and x % 3 != 0 and x % 5 != 0:
		t=t+1
if t>0:
	print('DENIED')
else:
	print('APPROVED')

n = int(input())
a = [int(i) for i in input().split()]
for i in range(n):
    if a[i] % 2 == 0:
        if a[i] % 3 != 0 and a[i] % 5 != 0:
            print('DENIED')
            break
    else:
        print('APPROVED')

N=input();print('DENIED'if any([x%2==0 and(x%3 and x%5)for x in map(int,input().split())])else'APPROVED')

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Wrong Answer

Accepted
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):
import sys

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

import sys

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


Verdicts: Runtime Error

Accepted
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):
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")

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

Verdicts: Wrong Answer

Accepted
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):
N = int(input())
Ai = input()
Ai = Ai.split(' ')
ans = 'APPROVED'
for moji in Ai:
    if moji % 2 != 0:
        pass
    else:
        if (moji % 3 == 0) or (moji % 5 == 0):
            pass
        else:
            ans = 'DENIED'
            break
print(ans)


N = int(input())
Ai = input()
Ai = Ai.split(' ')
ans = 'APPROVED'
for moji in Ai:
    moji = int(moji)
    if moji % 2 != 0:
        pass
    else:
        if (moji % 3 == 0) or (moji % 5 == 0):
            pass
        else:
            ans = 'DENIED'
            break
print(ans)


Verdicts: Runtime Error

Accepted
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):
N = int(input())
A = list(map(int, input().split()))
for a in A:
  if a % 2 == 1:
    continue
  if a / 3 == 0 or a / 5 == 0:
    continue
  print("DENIED")
  exit()
print("APPROVED")


N = int(input())
A = list(map(int, input().split())
         
for a in A:
      if a % 2 == 1:
         continue
      if a % 3 == 0:
         continue
      if a % 5 == 0:
         continue
         print("DENIED")
         exit()

print("APPROVED")         

N = int(input())
A = list(map(int, input().split()))
for a in A:
    if a % 2 != 0:
        continue
    elif a % 3 == 0:
        continue
    elif a % 5 == 0:
        continue
    else:
        print("DENIED")
        exit()

print("APPROVED")

Verdicts: Wrong Answer

Runtime Error

Accepted
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):
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("DENIED")
else:
  print("APPROVED")

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

Verdicts: Wrong Answer

Accepted
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):
N = int(input())
X = map(int,input().split())
def check():
    for i in range(N):
        if(i%2 == 0):
            if(i%3 == 0 & i%5 == 0):
                continue
            else:
                print("DENIED")
                return 0

        else:
            continue
    print("APPROVED")
check()


N = int(input())
X = map(int,input().split())
def check():
    for i in X:
        if(i%2 == 0):
            if(i%3 == 0 or i%5 == 0):
                continue
            else:
                print("DENIED")
                return 0

        else:
            continue
    print("APPROVED")
check()


Verdicts: Wrong Answer

Accepted
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):
N = int(input())
A = list(map(int,input().split()))
flag = 1
for i in A:
    if i%3!=0 or i%5!=0:
        flag = 0
        break
if flag==1:
    print("APPROVED")
else:
    print("DENIED")

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

Verdicts: Wrong Answer

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

flag = True
for i in l:
  if (i%3 != 0 and i%2 == 0) or (i%5 != 0 and i%2 == 0):
    flag = False
    break
    
if flag:
  print("APPROVED")
  
else:
  print("DENIED")

n = int(input())
l = list(map(int,input().split()))

flag = True
for i in l:
  if (i%3 != 0 and i%2 == 0) and (i%5 != 0 and i%2 == 0):
    flag = False
    break
    
if flag:
  print("APPROVED")
  
else:
  print("DENIED")


Verdicts: Wrong Answer

Accepted
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):
N = int(input())
A = int(input().split())
for i in range(N):
    print(i)
    print(A[i])
    if A[i]%2==0:
        if A[i]%15!=0:
            print("DENIED")
        else:
            print("APPROVED")
        

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



            

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


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




N = int(input())
A = input().split()
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")
            exit(0)
print("APPROVED")





Verdicts: Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Accepted
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):
n=input()
s=list(map(int,input().split()))
for i in s:
  if i%2==0:
    if i%3>0 or i%5>0:
      n=0
print(["APPROVED","DENIED"][n==0])

n=input()
s=list(map(int,input().split()))
for i in s:
  if i%2==0:
    if i%3>0 and i%5>0:
      n=0
print(["APPROVED","DENIED"][n==0])

Verdicts: Wrong Answer

Accepted
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):
N = int(input())
A = map(int, input().split())

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

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

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

Verdicts: Runtime Error

Accepted
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):
p = int(input())

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

bol = True

for val in vals :
	if val % 2 == 0 :
	  if not (val % p == 0 ) :
	    bol = False

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


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

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
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):
    # getting input on a variable 
aa = input()
a = list(map(int, input().split()))

check = None
for i in a:
    if i%2==0:
        if i%3==0 or i%5==0:
            check = True
        else:
            check = False
            break
    else:
        check = False
    
if check:
    print("APPROVED")
else:
    print("DENIED")

# d = list(map(int, input().split()))
n = int(input())
a = input().split()
even = []
even_counter = 0
div = 0
 
for i in a:
  int_a = int(i)
  if int_a % 2 == 0:
    even.append(int_a)
    even_counter += 1
 
for i in range(even_counter):
  if int(even[i]) % 3 == 0 or int(even[i]) % 5 == 0:
    div += 1
 
if div == even_counter:
  print("APPROVED")
else:
  print("DENIED")

Verdicts: Wrong Answer

Accepted
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):
_ = input()
*a,=input().split()
flag = True
for i in a:
  if i%2 == 0:
    if i%3 != 0:
      if i%5 != 0:
        flag = False
        break
if flag:
  print("APPROVED")
else:
  print("DENIED")

_ = input()
a=map(int,*input().split())
flag = True
for i in a:
  if i%2 == 0:
    if i%3 != 0:
      if i%5 != 0:
        flag = False
        break
if flag:
  print("APPROVED")
else:
  print("DENIED")

_ = input()
a=map(int,input().split())
flag = True
for i in a:
  if i%2 == 0:
    if i%3 != 0:
      if i%5 != 0:
        flag = False
        break
if flag:
  print("APPROVED")
else:
  print("DENIED")

Verdicts: Runtime Error

Runtime Error

Accepted
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):
import sys
n = int(sys.stdin.readline().rstrip())
li = list(map(int, sys.stdin.readline().split()))
li2 = []
for i in li:
  if not i % 2:
    li2.append(i)
if len(li2):
  flag = True
else:
  flag = False
for i in li2:
  if not i % 3 and i % 5:
    flag = False
    break
print('APPROVED' if flag else 'DENIED')


import sys
n = int(sys.stdin.readline().rstrip())
li = list(map(int, sys.stdin.readline().split()))
li2 = []
for i in li:
  if not i % 2:
    li2.append(i)
if not len(li2):
  flag = True
else:
  flag = False
for i in li2:
  if not i % 3 and not i % 5:
    flag = False
    break
print('APPROVED' if flag else 'DENIED')


import sys
n = int(sys.stdin.readline().rstrip())
li = list(map(int, sys.stdin.readline().split()))
flag = True
for i in li:
  if not i % 2:
    if i % 3 and i % 5:
      flag = False
print('APPROVED' if flag else 'DENIED')

Verdicts: Wrong Answer

Wrong Answer

Accepted
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):
def main():  
  N=input()
  A=list(map(int,input().split()))
  for a in A:
    if a%2==0 and  (a%3!=0 or a%5!=0):
      print("DENIED")
      return 
  print("APPROVED")

main()
    

def main():  
  N=input()
  A=list(map(int,input().split()))
  for a in A:
    if a%2==0 and  (a%3!=0 and a%5!=0):
      print("DENIED")
      return 
  print("APPROVED")

main()
    


Verdicts: Wrong Answer

Accepted
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):
N = int(input())
A = list(map(int,input().split()))
flag = 'APPROVED'
for a in A:
    print(a)
    if a % 2 == 0:
        if a % 3 != 0:
            if a % 5 != 0:
                flag = 'DENIED'
            break
print(flag)

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

Verdicts: Wrong Answer

Accepted