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


n = int(input())
a = list((int(x) for x in input().split()))
for num in a:
  if num%2 == 0:
    if not num%3 == 0 and num%5 == 0:
      print('DENIED')
      exit()
print('APPROVED')


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

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

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


n = int(input())
a = list((int(x) for x in input().split()))
for num in a:
  if num%6 != 0 and num % 10 != 0:
    print('DENIED')
    exit()
print('APPROVED')


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


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


Verdicts: Runtime Error

Wrong Answer

Runtime Error

Wrong Answer

Runtime Error

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())
numbers = input().split()
for i in range(n):
    n = int(numbers[i])
    if n % 3 != 0 and n % 5 != 0:
        print('DENIED')
        exit()
print('APPROVED')

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


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


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

for i in a:
  if i % 6 == 0 or i % 10 == 0:
    flag = 1
  else:
    flag = 0
    
if flag == 1:
  print('APPROVED')
else:
  print('DENIED')


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


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


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







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

else:
    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 and A[i] % 5 != 0:
            print('DENIED')
            exit()

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


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


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=[]
b=[]
for i in A:
    if i%2==0:
        a.append(i)
for n in a:
    if n%3==0 or n%5==0:
        b.append(n)
if len(a)==len(b):
    print('APPROAD')
else:
    print('DENIED')

N=int(input())
A=list(map(int,input().split()))
a=[]
b=[]
for i in A:
    if i%2==0:
        a.append(i)
for n in a:
    if n%3==0 or n%5==0:
        b.append(n)
if len(a)==len(b):
    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):
# 155b

def atc_155b(input_value: str) -> str:
    N = int(input_value[0])
    Ai = [int(ai) for ai in input_value[1].split(" ")]
    for i in range(0, N):
        if Ai[i] % 2 == 0 and Ai[i] % 3 != 0 and Ai[i] % 5 != 0:
            return "DENIED"
    return "APPROVED"

N = input()
Ai = input()
print(atc_155b[N, Ai])


# 155b

def atc_155b(input_value: str) -> str:
    N = int(input_value[0])
    Ai = [int(ai) for ai in input_value[1].split(" ")]
    for i in range(0, N):
        if Ai[i] % 2 == 0 and Ai[i] % 3 != 0 and Ai[i] % 5 != 0:
            return "DENIED"
    return "APPROVED"

N = input()
Ai = input()
print(atc_155b([N, Ai]))


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()))
p=True
for a in A:
  if a%2==0:
    if not a%3==0 or a%5==0:
      p=False
      break
print("APPROVED" if p else "DENIED")

N=int(input())
A=list(map(int,input().split()))
p=True
for a in A:
  if a%2==0:
    if not (a%3==0 or a%5==0):
      p=False
      break
print("APPROVED" if p else "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 = map(int, input().split())

A_ = [a for a in A if a % 2 == 0 and a % 3 == 0 and a % 5 == 0]

if len(A_) == N:
    print("APPROVED")
else:
    print("DENIED")

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

def f(x):
   if x % 2 == 0:
       if x % 3 == 0 | x % 5 == 0:
           return True
       else:
           return False
   else:
       return True
A_ = map(f, A)


if False in A_:
    print("DENIED")
else:
    print("APPROVED")

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

A_ = [a for a in A if a % 2 == 0 and a % 3 != 0 and a % 5 != 0]

if len(A_) > 0:
    print("DENIED")
else:
    print("APPROVED")

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

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

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

n=int(input())

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

for i in range(n):
    if a[i]%2==0:
        if a[i]%3==0 and a[i]==0:
            print("APPROVED")
            exit()
print("DENIED")

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

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'
            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())
n=list(map(int, input().split()))
a=[i for i in n if i%2==0]
A=len(a)
b=[i for i in a if i%3!=0 and i%5!=0]
B=len(b)
print("Yes" if B==0 else "No")


N=int(input())
n=list(map(int, input().split()))
a=[i for i in n if i%2==0]
A=len(a)
b=[i for i in a if i%3!=0 and i%5!=0]
B=len(b)
print("APPROVED" if B==0 else "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 = [0]*N
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')
      break
  if i == N-1:
    print('APPROVE')

N = int(input())

a = [0]*N
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')
      break
  if i == N-1:
    print('APPROVE')

N = int(input())

a = [0]*N
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')
      break
  if i == N-1:
    print('APPROVED')

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):
n=int(input())
l=[]
a=[]
b=[]
for i in range(n):
    m=[int(j) for j in input().split()]
    print(m)    
    for k in m:
        if k%2==0:
            l.append(k)

    if len(l)==0:
        print("DENIED")
        
    else:
        for p in l:
            if p%3==0 or p%5==0:
                a.append(p)
            else:
                b.append(p)

        if len(a)==len(l):
            print("APPROVED")
            
        else:
            print("DENIED")
    break   

n=int(input())
l=[]
a=[]
b=[]
for i in range(n):
    m=[int(j) for j in input().split()]
    
    for k in m:
        if k%2==0:
            l.append(k)
    
    for p in l:
        if p%3==0 or p%5==0:
            a.append(p)
        else:
            b.append(p)
 
    if len(a)==len(l):
        print("APPROVED")
    else:
        print("DENIED")
    break

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() if i % 2 == 0]
for i in a:
    if a % 3 != 0 and a % 5 != 0:
            print("DENIED")
            exit()
print("APPROVED")

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

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 i in range(n):
  if a[i]%2==0:
    if a[i]%3!=0 or a[i]%5!=0:
      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 and a[i]%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())
lst=[]
a,b,c=map(int,input().split())
lst.append(a)
lst.append(b)
lst.append(c)
for i in range(0,n):
    if lst[i]%2==0:
        if lst[i]%3==0 or lst[i]%5==0:
            print("APPROVED")
        else:
            print("DENIED")

n=int(input())
lst=list(map(int,input().split()))
for i in range(n):
  if lst[i]%2==0:
    if lst[i]%3==0 or lst[i]%5==0:
      result=1
  if result==1:
    print("APPROVED")
  else:
    print("DENIED")

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

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

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

n=int(input())
lst=[]
for i in range(0,n):
    ele=int(input())
    lst.append(ele)

for i in range(0,n):
    if lst[i]%2==0:
        if lst[i]%3==0 or lst[i]%5==0:
            print("APPROVED")
        else:
            print("DENIED")

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

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Runtime Error

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
read = sys.stdin.read
readlines = sys.stdin.readlines
import numpy as np
def main():
    a = np.fromstring(read(), np.int64, sep=' ')[1:]
    a = a[a % 2 == 0]
    if np.all((a % 3 == 0) or (a % 5 == 0)):
        print('APPROVED')
    else:
        print('DENIED')

if __name__ == '__main__':
    main()


import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
import numpy as np
def main():
    a = np.fromstring(read(), np.int64, sep=' ')[1:]
    a = a[a % 2 == 0]
    if np.all((a % 3 == 0) | (a % 5 == 0)):
        print('APPROVED')
    else:
        print('DENIED')

if __name__ == '__main__':
    main()


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()))
ans = DENIED

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

print(ans)

n = int(input())
a = list(map(int, input().split()))
ans = 'DENIED'
 
for i in range(n):
  if a[i]%2 == 1:
    continue
  else:
    if a[i]%3==0 or a[i]%5==0:
      continue
    else:
      break
else:
  ans = 'APPROVED'
 
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())
S = list(map(int,input().split()))
B= list()
X = list()
for i in S:
    if i % 2== 0:
        B.append(i)
for n in B:
    if n % 3 == 0 or n % 5 == 0:
        X.append(n)
if len(B) == len(X):
    print('APPROVE')
else:
    print('DENIED')





N = int(input())
S = list(map(int,input().split()))
B= list()
X = list()
for i in S:
    if i % 2== 0:
        B.append(i)
for n in B:
    if n % 3 == 0 or n % 5 == 0:
        X.append(n)
if len(B) == len(X):
    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):
3
28 27 24

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

main()

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 A[i]%5==0:
    else:
      flag=1
print(['APPROVED','DENIED'][flag])

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
print(['APPROVED','DENIED'][flag])


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

n = int(input());l = list(map(int, input().split()));ans = "APPROVED"
for i in (l):
  if(i%2 ==0 and (i%3 !=0 and i%5!=0)):
     ans = "DENIED"
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):
    # getting input on a variable 
aa = input()
a = list(map(int, input().split()))

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

a = int(input())
nums = input().split()
flag = True
for i in range (a):
    x = int(nums[i])
    if (x % 2 == 0):
        if not (x % 3 == 0 or x % 5 == 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=input()
N=int(n)
A=input().split()
for i in range(N):
  if int(A[i])%2==0:
    if int(A[i])%5==0 or int(A[i])%3==0:
      x+=1
  else:
    x+=1
if x==N:
  print('APPROVED')
else:
  print('DENIED')


N=int(input())
A=input().split()
for i in range(N):
  if int(A[i])%2==0:
    if int(A[i])%5==0 or int(A[i])%3==0:
      x+=1
  else:
    x+=1
if x==N:
  print('APPROVED')
else:
  print('DENIED')

N=int(input())
A=input().split
for i in range(N):
  if int(A[i])%2==0:
    if int(A[i])%5==0 or int(A[i])%3==0:
      x+=1
  else:
    x+=1
if x==N:
  print('APPROVED')
else:
  print('DENIED')





N=int(input())
A=input().split()
x=0
for i in range(N):
  if int(A[i])%2==0:
    if int(A[i])%5==0 or int(A[i])%3==0:
      x+=1
  else:
    x+=1
if x==N:
  print('APPROVED')
else:
  print('DENIED')


Verdicts: Runtime Error

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

ans = 'APPRONED'
for i in range(0, n) :
  if a_list[i]%2 == 0 :
    if (a_list[i]%3)*(a_list[i]%5) != 0 :
      ans = 'DENIED'
      break
print(ans)


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

ans = 'APPROVED'
for i in range(0, n) :
  if a_list[i]%2 == 0 :
    if (a_list[i]%3)*(a_list[i]%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):
X = [int(x) for x in input().split()]

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

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

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

print(Z)

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

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

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

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

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

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 and a[i]%3!=0) or (a[i]%2==0 and a[i]%5!=0):
    print('DENIED')
    exit()
print('APPROVED')


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




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()))
b = []
wk = wk1 = 0

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

for j in range(len(b)):
    if b[j]%3 == 0 or b[j]%5 == 0:
        wk = 1
    else:
        wk1 = 1
if wk1 == 1:
    print('DENIED')
else:5
    print('APPROVED')

n = int(input())
a = list(map(int,input().split()))
b = []
wk = wk1 = 0

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

for j in range(len(b)):
    if b[j]%3 == 0 or b[j]%5 == 0:
        wk = 1
    else:
        wk1 = 1
if wk1 == 1:
    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=map(int,input().split())

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



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

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




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

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




n=int(input())
a=map(int,input().split())
l=[]
for i in a:
  if i % 2 == 0:
    l.append(i)

for i in l:
  if i % 3 == 0 and i % 5 == 0:
    print('APPROVED')
print('DENIED')



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

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


B=[]

for i in range(N):
    if A[i]%2==1:
        B.append(0)
    elif A[i]%3==0:
        B.append(0)
    elif A[i]%5==0:
        B.append(0)
    else:
        B.append(1)

T = sum(B)
print(T)
if T==0:
    print("APPROVED")
else:
    print("DENIED")
        



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


B=[]

for i in range(N):
    if A[i]%2==1:
        B.append(0)
    elif A[i]%3==0:
        B.append(0)
    elif A[i]%5==0:
        B.append(0)
    else:
        B.append(1)

T = sum(B)

if T==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())
A=list(map(int,input().split()))
ret='APPROVED'
for i in A:
  if i%2==0 and (i%3==0 or i%5==0):
    continue
  else:
    ret='DENIED'
    break
print(ret)

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

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):
len=int(input())
list = input().split(" ")
msg="DENIED"
for i in range(len):
  if int(list[i])%2==0 and (int(list[i])==6 or int(list[i]) == 10):
    msg="APPROVED"
  elif int(list[i])%3==0 or int(list[i])%5==0:
    msg="APPROVED"
  else:
    msg="DENIED"
    break
  
print(msg)

len=int(input())
list = input().split(" ")
msg="DENIED"
for i in range(len):
  if int(list[i])%2==0 and (int(list[i])%3==0 or int(list[i])%5==0):
    msg="APPROVED"
  elif int(list[i])%3==0 or int(list[i])%5==0:
    msg="APPROVED"
  else:
    msg="DENIED"
    break
  
print(msg)

len=int(input())
list = input().split(" ")
msg="DENIED"
for i in range(len):
  if int(list[i])%2==0 and (int(list[i])%3==0 or int(list[i])%5==0):
    msg="APPROVED"
  elif int(list[i])%2==0:
    msg="DENIED"
    break
  else:
    msg="APPROVED"  
print(msg)

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

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

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):
import numpy as np

N = int(input())
A = np.array([int(val) for val in A])

A_even = set(A[A%2==0])
A_three = set(A[A%3==0])
A_five = set(A[A%5==0])

A_approve = A_even & (A_three | A_five)

if A_even == A_approve:
    print('APPROVED')
else:
    print('DENIED')

import numpy as np
 
N = int(input())
A = input().split()
A = np.array([int(val) for val in A])
 
A_even = set(A[A%2==0])
A_three = set(A[A%3==0])
A_five = set(A[A%5==0])
 
A_approve = A_even & (A_three | A_five)
 
if A_even == A_approve:
    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 = [int(x) for x in input().split()]
p = 0
for i in range(n):
    
    if a[i]%2 == 0 and a[i]%3 != 0:
        p += 1
    else:
        p = p
    if a[i]%2 == 0 and a[i]%5 != 0:
        p += 1
    else:
        p = p
if p > 0:
    print("DENIED")
else:
    print("APPROVED")


n = int(input())
a = [int(x) for x in input().split()]
p = 0
for i in range(n):
    if a[i]%2 == 0:
        if a[i]%3 != 0 and a[i]%5 != 0:
            p += 1
if p > 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())
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')


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

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(inpout())
numbers = map(int, input().split())

even_numbers = []
for i in numbers:
  if i % 2 == 0:
    even_numbers.append(i)

answers = []
for i in even_numbers:
  if i % 3 == 0 or i % 5 == 0:
    answers.append(i)

if even_numbers == answers:
  print('APPROVED')
else:
  print('DENIED')

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

even_numbers = []
for i in numbers:
  if i % 2 == 0:
    even_numbers.append(i)

answers = []
for i in even_numbers:
  if i % 3 == 0 or i % 5 == 0:
    answers.append(i)

if even_numbers == answers:
  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 = [int(i) for i in input().split()]

t = 0
for i in range(N):
    if A[i]%2 == 0:
        if A[i]%3 != 0 and A[i]%5 != 0:
            t += 1
    break
print('APPRPVED' if t == 0 else 'DENIED')

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

t = 0
for i in range(N):
    if A[i]%2 == 0:
        if A[i]%3 != 0 and A[i]%5 != 0:
            t += 1
    break
print('APPROPVED' if t == 0 else 'DENIED')

N = int(input())
A = [int(i) for i in input().split()]
t = 0
for i in range(N):
    a = A[i]
    if a%2 == 0:
        if a%3 != 0 and a%5 != 0:
            t += 1
            break

if t == 0:
    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):
a=input()
s=list(map(int, input().split()))
bad=0
for i in s:
    if s%2==0:
        if s%3!=0 or s%5!=0:
            bad+=1
if bad>0:
    print('DENIED') 
    else:
        print('APPROVED')



a=input()
s=list(map(int, input().split()))
bad=0
for i in s:
    if s%2==0:
        if s%3!=0 or s%5!=0:
            bad+=1
if bad>0:
    print('DENIED') 
else:
    print('APPROVED')



a=int(input())
s=list(map(int,input().split()))
count=0
good=0
for i in s:
    if i%2==0:
        count+=1
        if i%3==0 or i%5==0:
            good+=1
if good==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):
n= int(input())
lista=[]
listanova=[]
for x in input().split():
	x= int(x)
	if x %2 ==0:
		lista.append(x)
for x in lista:
	if x %3==0 or x%5==0:
		listanova.append(x)

if len(lista)==len(listanova):
	print('APROVED')
else:
	print('DENIED')


    n= int(input())
    lista=[]
    listanova=[]
    for x in input().split():
    	x= int(x)
    	if x %2 ==0:
    		lista.append(x)
    for x in lista:
    	if x %3==0 or x%5==0:
    		listanova.append(x)
     
    if len(lista)==len(listanova):
    	print('APPROVED')
    else:
    	print('DENIED')

n= int(input())
lista=[]
listanova=[]
for x in input().split():
	x= int(x)
	if x %2 ==0:
		lista.append(x)
for x in lista:
	if x %3==0 or x%5==0:
		listanova.append(x)

if len(lista)==len(listanova):
	print('APPROVED')
else:
	print('DENIED')


Verdicts: Wrong Answer

Runtime Error

Accepted