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

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


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

n = int(input())
li = list(map(int,input().split()))
flag = 1
for i in range(n):
    if(li[i] % 2 == 0):
        if((li[i] % 3 == 0) or(li[i] % 5 == 0)):
            #print(li[i])
            #flag=1
            continue
        else:
            #print(li[i])
            flag=0
    


if(flag == 1):
    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=input1()
A=input_array()
flag=True
for x in A:
	if x%2==0:
		if x%3==0 or x%5==0:
			continue
		else:
			flag=False
			break
if flag:
	print("APPROVED")
else:
	print("DENIED")


def input1():
	return int(input())


def input2():
	return map(int,input().split())


def input_array():
	return list(map(int,input().split()))





N=input1()
A=input_array()
flag=True
for x in A:
	if x%2==0:
		if x%3==0 or x%5==0:
			continue
		else:
			flag=False
			break
if flag:
	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 = list(map(int, input().split()))
jud = True
for i in range(n-1):
    if a[i]%2 == 0:
        if(a[i]%3 != 0 and a[i]%5 != 0):
            jud = False
            break
if judge:
    print('APPROVED')
else:
    print('DENIED')

n = int(input())
a = list(map(int, input().split()))
count = True
for i in range(n):
    if a[i]%2 == 0:
        if(a[i]%3 != 0 and a[i]%5 != 0):
            count = False
            break
if count:
    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 = list(map(int,input().split()))
ans = True
for i in a:
  if i % 2 == 0:
    if not i % 3 == 0 or i % 5 == 0:
      ans = False
      break
if ans:
  print('APPROVED')
else:
  print('DENIED')

n = int(input())
a = [i for i in map(int,input().split())]
Check = Fasle
check_list=[]
for s in range(n):
  if a[s]%2 == 0:
    check_list.append(a[s])
for t in range(len(check_list)):
  if check_list[t]%3 == 0 or check_list[t]%5==0:
    Check =True
if Check:
  print('APPROVED')
else:
  print('DENIED')

n = int(input())
a = list(map(int,input().split()))
ans = True
for i in a:
  if i % 2 == 0:
    if not (i % 3 == 0 or i % 5 == 0):
      ans = False
      break
if ans:
  print('APPROVED')
else:
  print('DENIED')


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

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

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

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

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 = list(map(int,input().split()))
for i in x:
  if i%2==0:
    if i%6!=0 or i%10!=0:
      print("DENIED")
      exit()
print("APPROVED")

n = int(input())
x = list(map(int,input().split()))
for i in x:
  if i%2==0:
    if i%6!=0:
      if i%10!=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):
def main():
    n = int(input())

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

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


if __name__ == '__main__':
    main()



def main():
    n = int(input())

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

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


if __name__ == '__main__':
    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())
lst = list(map(int,input().split()))
c = 0
for i in range(n):
  if (lst[i]%2 == 0):
    if (lst[i]%3 == 0 or lst[i]%5 == 0):
      c = 1
if (c == 0):
  print("APPROVED")
else:
  print("DENIED")


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

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


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()))
A_count = 0


for i in range(len(A)):
  if A[i]%2 != 0:
    A.pop(A[i]) 

for t in range(len(A)):
  if A[i]%3 == 0 or A[i]%5 == 0:
    A_count +=1
print("APPROVED" if A_count == len(A) else "DENIED")

    

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


for i in range(len(A)):
	if A[i]%2 != 0:
		A[i] = 0

for t in range(len(A)):
	if A[t] > 0:
		if A[t]%3 == 0 or A[t]%5 == 0:
			A[t] = 0
print("APPROVED" if sum(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):
n=int(input())
a=[int(input()) for i in range(n)]
count=0
for i in range(0,n):
  if a[i]%2==0:
    if a[i]%3==0 or a[i]%5==0:
      count=count+1
  else:
    count=count+1
if count==n
  print("APPROVED")
else:
  print("DENIED")

n=int(input())
a=[int(input()) for i in range(n)]
count=0
for i in range(0,n):
  if a[i]%2==0:
    if a[i]%3==0 or a[i]%5==0:
      count=count+1
  else:
    count=count+1
if count==n:
  print("APPROVED")
else:
  print("DENIED")

n=int(input())
a=list(map(int,input().split()))
count=0
for i in range(0,n):
  if a[i]%2==0:
    if a[i]%3==0 or a[i]%5==0:
      count=count+1
  else:
    count=count+1
if count==n:
  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):
#include <bits/stdc++.h>
using namespace std;

int main(){
  cout<<"Hello"<<endl;
}

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

flag=True
for a in A:
    if a%2==0:
        if (a%3!=0)&(a%5!=0):
            flag=False
            break

if flag:
    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=list(map(int, input().split()))
tmp = 0

for i in range(n):
    if a[i] % 2 == 0 and (a[i] % 3 != 0 and a[i] % 5 != 0):
        print('DENIED')
        tmp = 1
        break

if tmp == 0:
    rint('APPROVED')

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

for i in range(n):
    if a[i] % 2 == 0 and (a[i] % 3 != 0 and a[i] % 5 != 0):
        print('DENIED')
        tmp = 1
        break

if tmp == 0:
    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())
M=list(map(int,input().split()))
S=[]
T=[]
for i in range(0,len(M)-1)  
  if M[i]%2==0:
    T.append(M[i])
    S.append(M[i])
for j in range(0,len(S)-1)
  if S[j]%3!=0 and S[j]%5!=0:
    T.remove(S[j])
if len(S)==len(T):
  print('APPROVED')
else:
  pritn('DENIED')
    

N=int(input())
ans=0
m=0
for i in range(N):
  A=int(input())
  if A%2==0:
    m=m+1
    if A%3==0 or A%5==0:
    　　ans=ans+1
if m==N:
  print('APPROVED')
else:
  print('DENIED')

N=int(input())
ans=0
m=0
for i in range(N):
    A=int(input())
    if A%2==0:
        m=m+1
        if A%3==0 or A%5==0:
            ans=ans+1
if m==ans:
    print('APPROVED')
else:
    print('DENIED')


N=int(input())
M=list(map(int,input().split()))
S=[]
T=[]
for i in range(0,len(M))  :
  if M[i]%2==0:
    T.append(M[i])
    S.append(M[i])
for j in range(0,len(S)):
  if S[j]%3!=0 and S[j]%5!=0:
      T.remove(S[j])
    
if len(S)==len(T):
  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 = input()
A = map(int, input().split())

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

  



N = input()
A = 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()))
r = 'APPROVED'
for i in range(N):
  if a[i] % 2 ==0:
    if a[i] % 3 != 0 and a[i] % 5 != 0:
      r = 'DENIED'
      break
print(r)

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

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

_=int(input())
a=list(map(int,input().split()))
bool=True
for i in a:
    if i%2==0:
        if i%3==0 or i%5==0:
            pass
        else:
            bool=False
if bool:
    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()))
l=0
for i in range(n):
  if a[i]%2==0:
    l.append(a[i])
for j in range(len(l)):
  if l[j]%3==0 or l[j]%5==0:
    l.remove(l[j])
if len(l)==0:
  print('APPROVED')
else:
  print('DENIED')
  
  

n=int(input())
a=list(map(int,input().split()))
count=0
for i in range(n):
  if a[i]%2==0:
    if a[i]%3==0 or a[i]%5==0:
      pass
    else:
      count+=1
if count==0:
  print('APPROVED')
else:
  print('DENIED')
  

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):
A, B, C = map(int, input().split())
if (A == B or A == C) and (B != C):
    print('Yes')
elif (B == A or B == C) and (A != C):
    print('Yes')
elif (C == A or C == B) and (A != B):
    print('Yes')
else:
    print('No')

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


a,b,c = map(int, input().split())
if (a==b or a==c) and (b!=c):
    print('Yes')
elif (b==a or b==c) and (a!=c):
    print('Yes')
elif (c==a or c==b) and (a!=b):
    print('Yes')
else:
    print('No')



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

a,b,c = map(int, input().split())
if (a==b or a==c) and (b!=c):
    print('Yes')
elif (b==a or b==c) and (a!=c):
    print('Yes')
elif (c==a or c==b) and (a!=b):
    print('Yes')
else:
    print('No')



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

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

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

N = int(input())
lis = list(map(int,input().split()))
result = "DENIED"
for i in range(N):
    if i %2 ==0:
        if i %3 ==0 or i%5 ==0:
            result = "APPROVED"
        else :
            result = "DENIED"
            break
print(result)

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

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())
nums = list(map(int, input().split(' ')))
flag = False

for i in range(N):
  if nums[i]%2 == 0 :
    
    if (nums[i]%3 != 0) | (nums[i]%5 != 0):
      flag = True
      print('DENIED')
      break
    else:
      continue
  else:
    continue
    
if flag == False:
  print('APPROVED')

N = int(input())
nums = list(map(int, input().split(' ')))

flag = False
for i in range(N):
  if nums[i]%2 == 0:
    continue
  elif nums[i]%3 == 0:
    continue
  elif nums[i]%5 == 0:
    continue
  else:
    print('DENIED')
    flag = True
    break
if flag == False:
  print('APPROVED')

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



n = int(input())
A = list(map(int,input().split()))
ans = 1
for a in A:
  if a % 2 == 0:
    if a % 3 != 0 or a % 5 != 0:
      ans = 0
      break()
      
if ans:
  print(APPROVED)
else:
  print(DENIED)
  



n = int(input())
A = list(map(int,input().split()))
ans = 1
for a in A:
  if a % 2 == 0:
    if not(a % 3 == 0 or a % 5 == 0):
      ans = 0
      break
      
if ans == 1:
  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())
L = list(map(int, input().split()))
count = 0
count2 = 0
for i in range(0, N):
  if L[i]%2==0:
    count = count + 1
    if L[i]%3==0 or L[i]%5==0:
      count2 = count2 + 1

if count == count2:
  prin("APPROVED")
else:
  print("DENIED")


N = int(input())
L = list(map(int, input().split()))
count = 0
for i in range(0, N):
  if L[i]%2==0:
    if L[i]%3==0 or L[i]%5==0:
      print("APPROVED")
      count = 1

if count == 0:
  print("DENIED")

N = int(input())
L = list(map(int, input().split()))
count = 0
count2 = 0
for i in range(0, N):
  if L[i]%2==0:
    count++
    if L[i]%3==0 or L[i]%5==0:
      count2++

if count == count2:
  prin("APPROVED")
else:
  print("DENIED")


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

if count == 0:
  print("DENIED")


N = int(input())
L = list(map(int, input().split()))
count = 0
count2 = 0
for i in range(0, N):
  if L[i]%2==0:
    count = count + 1
    if L[i]%3==0 or L[i]%5==0:
      count2 = count2 + 1

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


Verdicts: 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):
n = int(input())
a = list(map(int,input().split()))
ans = "APPOROVED"
for i in range(n):
  if(a[i]%2==0):
    if(a[i]%3!=0)and(a[i]%5!=0):
      ans = "DENIED"
      break
  else:
    None
print(ans)


n = int(input())
a = list(map(int,input().split()))
ans = "APPOROVED"
for i in range(n):
  if(a[i]%2==0):
    if(a[i]%3==0)or(a[i]%5==0):
      None
    else:
      ans = "DENIED"
      break
  else:
    None
print(ans)

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


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):
input().splitlines()
a = list(map(int, (input().splitlines())[0].split()))
b = []
for i in range(len(a)):
  if (a[i] % 2) == 0:
    if (((a[i] % 3) == 0) or ((a[i] % 5) == 0)):
      b.append(True)
    else: 
      b.append(False)
if (len(b) == 0) or (False in b):
  print("APPROVED")
else:
  print("DENIED")

input()
a = list(map(int, input().split()))
b = []
for i in range(len(a)):
  if (a[i] % 2) == 0:
    if (((a[i] % 3) == 0) or ((a[i] % 5) == 0)):
      b.append(True)
    else: 
      b.append(False)
if (len(b) == 0) or (False in b):
  print("APPROVED")
else:
  print("DENIED")

c = list(map(int, input().split()))
a = list(map(int, input().split()))
b = []
for i in range(len(a)):
  if (a[i] % 2) == 0:
    if (((a[i] % 3) == 0) or ((a[i] % 5) == 0)):
      b.append(True)
    else: 
      b.append(False)
if (len(b) == 0) or (False in b):
  print("APPROVED")
else:
  print("DENIED")

input()
a = list(map(int, input().split()))
b = []
for i in range(len(a)):
  if (a[i] % 2) == 0:
    if (((a[i] % 3) == 0) or ((a[i] % 5) == 0)):
      b.append(True)
    else: 
      b.append(False)
if (len(b) == 0) or (False in b):
  print("APPROVED")
else:
  print("DENIED")

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

flg = True
for i in range(n):
    if lst[i]%2!=0:
        continue
    if lst[i]%3!=0 or lst[i]%5!=0:
        flg = False
        break
print('APPROVED' if flg else 'DENIED')

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

flg = True
for i in range(n):
    if lst[i]%2!=0:
        continue
    if lst[i]%3==0 or lst[i]%5==0:
        continue
    else:
        flg=False
        break
print('APPROVED' if flg 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):
# -*- coding: utf-8 -*-
"""
Created on Tue Mar  3 23:44:02 2020

@author: Kanaru Sato
"""

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

deny = 0

for i in range(0,N):
    if A[i]%2 == 0 and (A[i]%3 != 0 and A[i]%5 != 0):
        deny = 1

if deny == 1:
    print("DENIED")
else:
    print("APRROVED")



# -*- coding: utf-8 -*-
"""
Created on Tue Mar  3 23:44:02 2020

@author: Kanaru Sato
"""

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

deny = 0

for i in range(0,N):
    if A[i]%2 == 0 and (A[i]%3 != 0 and A[i]%5 != 0):
        deny = 1

if deny == 1:
    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):
input()
nums = [int(n_str) for n_str in input().split(' ')]

for num in nums:
  if num % 2 == 0:
    if num % 3 != 0 and num % 5 != 0:
      print("DENIED")
	  exit()

print("APPROVED")

input()
nums = [int(n_str) for n_str in input().split(' ')]

for num in nums:
  if num % 2 == 0:
    if num % 3 != 0 and num % 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()))
arr=[]
for A in a:
    if A%2==0:
        arr.append(A)
    else:
        pass

for n in arr:
    if n%3==0 or n%%==0:
        pass
    else:
        print('DENIED')
        exit()
print('APPROVED')

N=int(input())
a=list(map(int,input().split()))
arr=[]
for A in a:
    if A%2==0:
        arr.append(A)
    else:
        pass

for n in arr:
    if n%3==0 or n%5==0:
        pass
    else:
        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())
x = map(int, input().split())

for i in x :
    if i % 2 == 0 :
      if  i % 3!=0 or i % 5 !=0:
        print('DENIED')
        exit()

print('APPROVED')




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

for i in x :
    if i % 2 == 0 :
      if  i % 3!=0 and 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 = input()
nums = map(int, input())
print(nums)

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

def main():
    for n in nums:
        if n%2==0 and n%3!=0 and n%5!=0:
            print("DENIED")
            return
    print("APPROVED")
    return

if __name__ == "__main__":
    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):
a = int(input())
array = list(map(int, input().split())) 
ans = "APPROVED"
nu = 0
for i in range a:
  nu = array[i]
  if nu % 2 == 0:
    if nu % 3 == 0 or nu % 5 == 0:
      pass
    else:
      ans = "DENIED"
print(ans)

a = int(input())
array = list(map(int, input().split())) 
ans = "APPROVED"
nu = 0
for i in range (a):
  nu = array[i]
  if nu % 2 == 0:
    if nu % 3 == 0 or nu % 5 == 0:
      pass
    else:
      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):
N = int(input())
A = list(map(int,input().split()))
ans = "APPROVED"
for i in range(len(A)):
    flag = 1
    if A[i]%2 == 0:
        if A[i]%3 != 0:
            flag = flag - 1
        if A[i]%5 != 0:
            flag = flag - 1  
        if flag < 0: 
            ans = "DENIED"
        print(flag)
print(ans)

N = int(input())
A = list(map(int,input().split()))
ans = "APPROVED"
for i in range(len(A)):
    flag = 1
    if A[i]%2 == 0:
        if A[i]%3 != 0:
            flag = flag - 1
        if A[i]%5 != 0:
            flag = flag - 1  
        if flag < 0: 
            ans = "DENIED"
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()))
s=0
for i in a:
  if a%2==0:
    if a%3!=0 and a%5!=0:
      s=s+1
print('DENIED' if s>0 else 'APPROVED')

n=int(input())
a=list(map(int,input().split()))
s=0
for i in a:
  if i%2==0:
    if i%3!=0 and i%5!=0:
      s=s+1
print('DENIED' if s>0 else '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())
l = map(int, input().split())
b = all([i%3==0 and i%5==0 for i in l if i%2 == 0])
print('APPROVED' if b else 'DENIED')

n = int(input())
l = map(int, input().split())
b = all([i%3==0 or i%5==0 for i in l if i%2 == 0])
print('APPROVED' if b 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()))

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

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

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

flag = 1
for i in range(N):
    if(A[i] % 2 == 0):
        if(A[i] % 3 != 0 and A[i] % 5 != 0):
            flag = 0

if(flag == 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())

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

even = 0
bai = 0
for i in range(N):
    if A[i] % 2 == 0:
        even = even + 1
        print(even)
        if A[i] % 3 == 0 or A[i] % 5 == 0:
            bai = bai + 1
    i = i + 1
    
if even == bai:
    print("APPROVED")
else:
    print("DENIED")
            
            

N = int(input())

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

even = 0
bai = 0
for i in range(N):
    if A[i] % 2 == 0:
        even = even + 1
        if A[i] % 3 == 0 or A[i] % 5 == 0:
            bai = bai + 1
    i = i + 1
    
if even == bai:
    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 N:
  if A[i] % 2 == 0:
    if A[i] % 3 == 0 or A[i] % 5 == 0:
print('APPROVED')
    else:
print('DENIED')
  else:
print('DENIED')

N = int(input())
A = (input().split())
i_count = 0
test = []
 for i in A:
  num = int(i) % 2
  if num == 0 :
    test.append(i)
 
 for i in test:
  num3 = int(i) % 3
  num5 = int(i) % 5
  if num3 == 0 or num5 ==0:
    i_count += 1
 
 if i_count == len(test):
  print("APPROVED")
else:
  print("DENIED")


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

B = [0 for _ in range(N)]

count = 0

for i in range(N):
  if A[i] % 2 == 0:
    B[i] = A[i]
    count += 1

C = [i for i in B if i != 0]

flag = 0
for i in range(count):
  if C[i] % 3 != 0 and C[i] % 5 != 0:
    flag += 1
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):
a=int(input())
Paper=list(map(int,input().split()))
m=0
for i in range (a):
  if Paper[i]%2==0:
    if not Paper[i]%3==0 or Paper[i]%5==0:
      m=m+1
return m

if not m=0:
  print("DENIED")
else:
  print("APPROVED")


a=int(input())
Papers=list(map(int,input().split()))
m=0
for i in range (a):
  if Papers[i] %2==0:
    if not (Papers[i] %3==0 or Papers[i] %5==0):
      m=m+1

if not m=0:
  print("DENIED")
else:
  print("APPROVED")


a=int(input())
Paper=list(map(int,input().split()))
m=0
for i in range (a):
  if Paper[i]%2==0:
    if not Paper[i]%3==0 or Paper[i]%5==0:
      m=m+1
return m

if not m==0:
  print("DENIED")
else:
  print("APPROVED")


a=int(input())
Papers=list(map(int,input().split()))
m=0
for i in range (a):
  if Papers[i] %2==0:
    if not (Papers[i] %3==0 or Papers[i] %5==0):
      m=m+1

if not m==0:
  print("DENIED")
else:
  print("APPROVED")


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


n=int(input())
l=list(map(int, input().split()))
br=0
for i in range (n):
    if l[i]%2==0 and l[i]%5==0 or l[i]%3==0:
        br+=1
if br==n:
    print("APPROVED")
else:
    print("DENITED")


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


n=int(input())
l=list(map(int, input().split()))
br=0
p=0
for i in range (n):
    if l[i]%2==0:
        p+=1
        if l[i]%5==0 or l[i]%3==0:
            br+=1
   
if br==p:
    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())
a_list = [int(x) for x in input().split(' ')]
a_list = list(filter(lambda x:x%2 == 0 and (x%3 != 0 and x%5 != 0), a_list))
print(a_list)

if not a_list:
    print('APPROVED')
else:
    print('DENIED')

N = int(input())
a_list = [int(x) for x in input().split(' ')]
a_list = list(filter(lambda x:x%2 == 0 and (x%3 != 0 and x%5 != 0), a_list))

if not a_list:
    print('APPROVED')
else:
    print('DENIED')

Verdicts: Wrong Answer

Accepted