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):
import numpy as np
N = input()
list = list(map(int,input().split(' ')))

list = np.array(list)
A = list[list%2 == 0]
B = np.unique(np.append(list[list%6 == 0],(list[list%10 == 0])))
print(A)
print(B)

if (A == B).any() :
    print('APPROVED')
else:
    print('DENIED')


import numpy as np
N = input()
list = list(map(int,input().split(' ')))

list = np.array(list)

if (list[list%2 == 0]==list[list%6 == 0 or list%10 == 0]) :
    print('APPROVED')
else:
    print('DENIED')


import numpy as np
N = input()
list = list(map(int,input().split(' ')))

list = np.array(list)
A = list[list%2 == 0]
B = np.unique(np.append(list[list%6 == 0],(list[list%10 == 0])))
if A == B :
    print('APPROVED')
else:
    print('DENIED')


import numpy as np
N = input()
list = list(map(int,input().split(' ')))

list = np.array(list)

if (list[list%2 == 0]==list[list%6 == 0 or list%10 == 0]) :
    print('APPROVED')
else:
    ('DENIED')


rt numpy as np
N = input()
list = list(map(int,input().split(' ')))

list = np.array(list)
A = list[list%2 == 0]
B = np.unique(np.append(list[list%6 == 0],(list[list%10 == 0])))

if len(A) ==0:
        print('APPROVED')
elif len(B) ==0:
    print('DENIED')
else:
    if len(A) == len(B) :
        print('APPROVED')
    else:
        print('DENIED')


import numpy as np
N = input()
list = list(map(int,input().split(' ')))

list = np.array(list)
A = np.unique(list[list%2 == 0])
B = np.unique(np.append(list[list%6 == 0],(list[list%10 == 0])))

if len(A) ==0:
        print('APPROVED')
elif len(B) ==0:
    print('DENIED')
else:
    if len(A) == len(B) :
        print('APPROVED')
    else:
        print('DENIED')


Verdicts: Runtime Error

Runtime Error

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):
#!/usr/bin/env python
# -*- coding: utf-8 -*-
N=int(input())
i = list(map(int, input().split()))
c=0

for k in range(0,N):
  if i[k]%2==0:
    if (i[k]%3!=0) or (i[k]%5!=0):
      c=c+1

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

#!/usr/bin/env python
# -*- coding: utf-8 -*-
N=int(input())
i = list(map(int, input().split()))
c=0

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

if c==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 = input()
A = [int(x) for x in input().split()]
x=0
for i in A:
  if A%2==0:
    if not A%3==0 or A%5==0:
      print("DENIED")
      x=1
      break
    
  else:
   	continue
  break
if x !=0:
	print("APPROVED")
  

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

x=0
for i in A:
  print(i)
  if i%2==0:
    if not i%3==0 and not i%5==0:
      print("DENIED")
      x=1
      break
    else:
      continue
    
  else:
   	continue
  break
if x ==0:
	print("APPROVED")

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

  if i%2==0:
    if not i%3==0 and not i%5==0:
      print("DENIED")
      x=1
      break
    else:
      continue
    
  else:
   	continue
  break
if x ==0:
	print("APPROVED")

Verdicts: Runtime Error

Wrong Answer

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

Submission attempts (in order):
def ApproveOrDeny(number_list):
  for num in number_list:
    if num % 2 == 0:
      if num % 3 != 0:
        return 'DENIED'
      if num % 5 != 0:
        return 'DENIED'
  return 'APPROVED'

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

def ApproveOrDeny(number_list):
  for num in number_list:
    if num % 2 == 0:
      if num % 3 != 0 and num % 5 != 0:
        return 'DENIED'
  return 'APPROVED'
 
N = int(input())
number_list = list(map(int, input().split()))
print (ApproveOrDeny(number_list))

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()) for i in range(int(input()))]
flag = True
for i in a:
  if i % 2 == 0:
    if i%3 != 0 and i%5 != 0:
      flag = False
      break
print('APPROVED' if flag else 'DENIED')

input()
a = list(map(int, input().split()))
flag = True
for i in a:
  if i % 2 == 0:
    if i%3 != 0 and i%5 != 0:
      flag = False
      break
print('APPROVED' if flag 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 = input()
list = input().split(" ")
for number in list:
  int_number = int(number)
  if (int_number % 2) == 0:
    if int_number %3 != 0:
      if int_number %5 != 0:
      	print("DENIED")
      	exit()
print("ACCEPTED")


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

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

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

N = int(input())
A = list(map(int, input().split()))
app_fl = True
for Ai in [a for a in A if a % 2 == 0]:
    if Ai % 3 != 0 and Ai % 5 != 0:
        app_fl = False
        break
 

if app_fl is True:
    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()))

for i in range(n):
    if L[i]%2 == 0:
        if L[i]%3 == 0 or L[i]%5== 0:
            continue
        else:
            print("DENIED")
            exit()

print("APPROVRD")

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

for i in range(n):
    if L[i]%2 == 0:
        if L[i]%3 == 0 or L[i]%5== 0:
            continue
        else:
            print("DENIED")
            exit()

print("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())
As=list(map(int, input().split()))
rejected=false
for A in As:
  if A%2==0:
    if A%3*(A%5)!=0:
      rejected=true
if rejected:
  print("DENIED")
else:
  print("APPROVED")

N=int(input())
As=list(map(int, input().split()))
rejected=False
for A in As:
  if A%2==0:
    if A%3*(A%5)!=0:
      rejected=True
if rejected:
  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 = []
for i in range(0, n) :
	temp = int(input())
	A.append(temp)
flag = True
for i in range(0, n) :
	if A[i] % 2 != 0 :
		continue
	elif A[i] % 2 == 0 and (A[i]%3 == 0 or A[i]%5 == 0) :
		continue
	else :
		flag = False
		break
if flag :
	print ("APPROVED")
else :
	print ("DENIED")

n = int(input())
A = [int(x) for x in input().split()]
flag = True
for i in range(0, n) :
	if A[i] % 2 != 0 :
		continue
	elif A[i] % 2 == 0 and (A[i]%3 == 0 or A[i]%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):
from fractions import gcd
A,B,C,D = map(int, input().split())
X = B//C - (A-1)//C
Y = B//D - (A-1)//D
lcm = round(C*D//gcd(C,D))
Z = B//lcm - (A-1)//lcm
print(B-A+1-X-Y+Z)

N=int(input())
A = list(map(int, input().split()))
outflag = 0
for i in range(N):
    if A[i]%2==0:
        if A[i]%3==0 or A[i]%5==0:
            pass
        else:
            outflag=1
            break
    else:
        pass
print("DENIED" if outflag 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())
A = [int(s) for s in input().rstrip().split(' ')]
k = 1
for i in range(N):
  if A[i] % 2 == 0:
    if A[i] % 3 != 0 or A[i] % 5 != 0:
      k = 0
if k == 1:
  print("APPROVED")
elif k == 0:
  print("DENIED")

N = int(input())
A = [int(s) for s in input().rstrip().split(' ')]
k = 1
for i in range(N):
  if A[i] % 2 == 0:
    if A[i] % 3 != 0 and A[i] % 5 != 0:
      k = 0
if k == 1:
  print("APPROVED")
elif k == 0:
  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())
li=map(int,input().split())
a=0
for k in li:
  if k %2==0:
    if k%3==0 or k%5==0:
      continue
    else:
      print('DENIED')
      a=1
      break
if a==0:
  print('APPROVE')



N=int(input())
li=map(int,input().split())
for k in li:
  if k %2=0:
    if k%3=0 or k%5=0:
      continue
    else:
      print('APPROVED')
      break
  else:
    continue
  print('DENIED')

N=int(input())
li=map(int,input().split())
a=0
for k in li:
  if k %2==0:
    if k%3==0 or k%5==0:
      continue
    else:
      a=1
      break
if a==0:
  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()))
fl = True
for i in A:
    if i&1:
        continue
    else:
        if i%3!=0 or i%5!=0:
            fl = False
            break

print('APPROVED') if fl else print('DENIED')

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

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

read = lambda: map(int, input().split())
n = int(input())
a = list(read())
print('APPROVED' if sum(i%3 and i%5 for i in a if i%2==0) ==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 = list(map(int, input().split()))

s = "APPRPVED"

for i in A:
    if i % 2 == 0:
        if i % 3 != 0 and i % 5 != 0:
            s = "DENIED"

print(s)


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

s = "APPROVED"

for i in A:
    if i % 2 == 0:
        if i % 3 != 0 and i % 5 != 0:
            s = "DENIED"

print(s)


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

result = "APPROVED"

for i in range(N):
    if (A[i] % 2 == 1) or ((A[i] % 2 == 0) and (A[i] % 3 == 0 or A[i] % 5 == 0)):
    else:
        result ="DENIED"
        break


print(result)

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

result = "APPROVED"

for i in range(N):
    if not( (A[i] % 2 == 1) or ((A[i] % 2 == 0) and (A[i] % 3 == 0 or A[i] % 5 == 0)) ):
        result ="DENIED"
        break


print(result)

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

    for a in A:
        if a % 2 == 0:
            if not a % 3 == 0 or a % 5 == 0:
                print('DENIED')
                return
    print('APPROVED')


if __name__ == '__main__':
    main()


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

    for a in A:
        if a % 2 == 0:
            if not (a % 3 == 0 or a % 5 == 0):
                print('DENIED')
                return
    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())
List = list(map(int,input().split()))
k=0
for s in List:
  if s%2==1 or s%3==0 or s%5==0:
    k+=1
if k==n:
  print("APPPROVED")
else:
  print("DENIED")

n = input()
List = list(map(int,input().split()))
k=0
for s in List:
  if s%2==1 or s%3==0 or s%5==0:
    k+=1
if k==n:
  print("APPPROVED")
else:
  print("DENIED")

n = int(input())
List = list(map(int,input().split()))
k="APPROVED"
for s in List:
  if s%2==0 and s%3!=0 and s%5!=0:
    k="DENIED"
    break
print(k)


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 = input()
N = int(N)
A = list(map(int,input().split()))
B = [ i for i in A if i % 2 == 0 or ]
C = [ d for d in B if i % 3 == 0 or i % 5 == 0]
R = len(C)
if R == 0:
  print("APPROVED")
else:
  print("DENIED")

N = input()
N = int(N)
A = list(map(int,input().split()))
B = [ i for i in A if i % 2 ==0]
C = [ d for d in B if  d % 3 == 0 or d % 5 == 0]
R = len(C)
Q = len(B)
if R == Q:
  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):
# input
N = int(input())
A = list(map(int, input().split()))


app_fl = True
for Ai in A:
    if Ai % 3 != 0 or Ai % 5 != 0:
        app_fl = False
        break

if app_fl is True:
    print("APPROVED")
else:
    print("DENIED")

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


app_fl = True
for Ai in A:
    if Ai % 2 == 0 and (Ai % 3 != 0 or Ai % 5 != 0):
        app_fl = False
        break

if app_fl is True:
    print("APPROVED")
else:
    print("DENIED")

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


app_fl = True
for Ai in [a for a in A if a % 2 == 0]:
    if Ai % 3 != 0 and Ai % 5 != 0:
        app_fl = False
        break

if app_fl is True:
    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):
print("APPROVED" if int(input()) == xsum([1 for e in [int(a) for a in input().split(" ")] if not(e % 2 == 0 and e % 3 != 0 and e % 5 != 0)]) else "DENIED")

print("APPROVED"if int(input())==sum([1 for e in[int(a)for a in input().split(" ")]if not(e%2==0 and e%3!=0 and e%5!=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):
cnt = int(input())
tar_list = list(map(int, input().split()))
flg = False
for i in range(cnt):

  if tar_list[i] % 2 == 0:
    if tar_list[i] % 3 == 0 or if tar_list[i] % 5 == 0:
    else:
      flg = True
      print("DENIED")
      break
      
if flg == False:
  print("APPROVED")

cnt = int(input())
tar_list = list(map(int, input().split()))
flg = False
for i in range(cnt):

  if tar_list[i] % 2 == 0:
    if tar_list[i] % 3 == 0 or tar_list[i] % 5 == 0:
      flg = False
    else:
      flg = True
      print("DENIED")
      break
      
if flg == False:
  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):
# -*- coding: utf-8 -*-
N = int(input())
A = map(int, input().split())

success =
for a in A:
    if a % 2  == 0 and (a % 3 == 0 or a % 5 ==0):
        print("DENIED")

print("APPROVED")

# -*- coding: utf-8 -*-
N = int(input())
A = map(int, input().split())

for a in A:
    if a % 2 == 0:
        if a % 3 == 0 or a % 5 == 0:
            continue
        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):
'''
    Auther: ghoshashis545 Ashis Ghosh
    College: jalpaiguri Govt Enggineerin College
    Date:24/03/2020
'''

def main():
    
    # for _ in range(ii()):
    n=int(input())
    a=list(map(int,input().split()))
    f=0
    for i in a:
        if(i%2==0);
            if(i%3!=0 or i%5!=0):
                f=1
                break
    if(f):
        print('DENIED')
    else:
        print('APPROVED')
        
















    
    
if __name__ =="__main__":
    main()

'''
    Auther: ghoshashis545 Ashis Ghosh
    College: jalpaiguri Govt Enggineerin College
    Date:24/03/2020
'''

def main():
    
    # for _ in range(ii()):
    n=int(input())
    a=list(map(int,input().split()))
    f=0
    for i in a:
        if(i%2==0):
            if(i%3!=0 and i%5!=0):
                f=1
                break
    if(f):
        print('DENIED')
    else:
        print('APPROVED')
        
















    
    
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):
num=int(input())
youso_list=input().split(' ')
boolean=True

for youso in youso_list:
    magic_num=0
    youso=int(youso)
    if youso%2!=0:
        continue
    
    if youso%3!=0:
        magic_num+=1
        
    if youso%5!=0:
        magic_num+=1
    
    if magic_num==2:
        boolean==False
        break

print(magic_num)
if boolean==False:
    print('DENIED')

elif boolean==True:
    print('APPROVED')

num=int(input())
youso_list=input().split(' ')
boolean=True

for youso in youso_list:
    magic_num=0
    youso=int(youso)
    if youso%2!=0:
        continue
    
    if youso%3!=0:
        magic_num+=1
        
    if youso%5!=0:
        magic_num+=1
    
    if magic_num==2:
        boolean==False
        break

print(magic_num)
if boolean==False:
   print('APPROVED') 

elif boolean==True:
   print('DENIED')
    

# coding: utf-8
# Your code here!
num=int(input())
youso_list=input().split(' ')
boolean=True

for youso in youso_list:
    magic_num=0
    youso=int(youso)
    if youso%2!=0:
        continue
    
    if youso%3!=0:
        magic_num+=1
        
    if youso%5!=0:
        magic_num+=1
    
    if magic_num==2:
        boolean=False
        break

if boolean==False:
    print('DENIED')

elif boolean==True:
    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()))

A_even =list()

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

miss = True


for i in range(len(A_even)):
    if A_even[i]%3 == 0 or A_even[i]%5 == 0:
        pass
    else:
        miss = False
        break
if miss:
    print("DENIED")
else:
    print("APPROVED")


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

A_even =list()

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

miss = True


for i in range(len(A_even)):
    if A_even[i]%3 == 0 or A_even[i]%5 == 0:
        pass
    else:
        miss = False
        break
if miss:
    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):
inputs = map(int, input().split(" "))

is_denied = False
for i in inputs:
  if i % 2 ==0:
    if i % 3 != 3 or i % 5 != 5
    	is_denied = True
      
if is_denied:
  print("DENIED")
else:
  print("APPROVED")

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

is_denied = False

for i in inputs:
  if i % 2 ==0:
    if i % 3 != 0 or i % 5 == 0:
      is_denied = True
      

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

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

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




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())
A=list(map(int,input().split()))
B=[]
for i in range (N):
    if A[i]%2==0:
        B.append(A[i])

x=len(B)
hantei=0
for i in range(x):
    if B[i]%3==0:
        hantei=hantei+1
    elif B[i]%5==0:
        hantei=hantei+1
    else:
        pass

if hantei>=2:
    print('APPROVED')
else:
    print('DENIED')

print(hantei)


N=int(input())
A=list(map(int,input().split()))
B=[]
for i in range (N):
    if A[i]%2==0:
        B.append(A[i])

x=len(B)
hantei=0
for i in range(x):
    if B[i]%3==0:
        hantei=hantei+1
    elif B[i]%5==0:
        hantei=hantei+1
    else:
        pass

if hantei>=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):
n = int(input())
nums = [int(i) for i in input().split(" ")]

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

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

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

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

approved = True
for num in nums:
  if num%2 == 0:
    approved = approved & ((num%3 == 0) or (num%5 == 0))
if approved:
  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()))

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

else:
    print('APROVED')


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

for i in range(n):
    if a[i] % 2 == 0:
        if a[i] != 0 or a[i] != 0:
            print('DENIED')
            break

else:
    print('APPROVED')

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

for i in range(n):
    if a[i] % 6 == or a[i] % 10:
        print('APPROVED')
        break

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 or a[i] % 5 == 0:
            continue
        else:
            print('DENIED')
            exit()

print('APPROVED')


Verdicts: Wrong Answer

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

n = input()
l = input().split() 
l = [int(x) for x in l]
e =[]
f =[int(x) for x in l if x%2==0]
for i in range(len(l)):
    if l[i] % 2 == 0 and (l[i]%3 ==0 or l[i]%5==0):
        e.append(l[i])
if (len(e)==len(f)):
    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):
def judge(N, A):
  cnt = 0
  odd = 0
  for i in range(N):
    if A[i] % 2 != 0:
      odd += 1
      continue
    else:
      if (A[i] % 3 == 0) or (A[i] % 5 == 0):
        cnt += 1
  even = N - odd
  if cnt == even:
    print('APROVED')
  else:
    print('DENIED')
    
N = int(input())
A = list(map(int, input().split()))
judge(N, A)

def judge(N, A):
  cnt = 0
  odd = 0
  for i in range(N):
    if A[i] % 2 != 0:
      odd += 1
    else:
      if (A[i] % 3 == 0) or (A[i] % 5 == 0):
        cnt += 1
  even = N - odd
  if cnt == even:
    print('APPROVED')
  else:
    print('DENIED')
    
N = int(input())
A = list(map(int, input().split()))
judge(N, A)

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())
li=list(map(int,input().split()))
even=[]
ans="APPRIVED"

for i in li:    
  if i%2==0:
    even.append(i)
    
for j in even:
  if j%3!=0 and j%5!=0:
    ans="DENIED"
print(ans)

n=int(input())
li=list(map(int,input().split()))
even=[]
ans="APPROVED"

for i in li:    
  if i%2==0:
    even.append(i)
    
for j in even:
  if j%3!=0 and j%5!=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 = input()
A = list(map(str, input().split()))
B=[]
C=[]
l=[]
m=[]
i=0
for a in range(int(N)):
    if int(A[a])%2==0:
       B.append(A[a])
       i=i+1
print(B)
for a in range(int(i)):
    if not int(B[a])%3==0 or int(B[a])%5==0:
       C=1
    else:
       C=0
print(C)
if C==1:
   print("DENIED")
else:
   print("APPROVED")

N = input()
A = list(map(str, input().split()))
B=[]
C=[]
l=[]
m=[]
i=0
for a in range(int(N)):
    if int(A[a])%2==0:
       B.append(A[a])
       i=i+1
for a in range(int(i)):
    if not int(B[a])%3==0 or int(B[a])%5==0:
       C=1
    else:
       C=0
if C==1:
   print("DENIED")
else:
   print("APPROVED")

N = input()
A = list(map(str, input().split()))
B=[]
C=[]
l=[]
m=[]
n=0
i=0
for a in range(int(N)):
    if int(A[a])%2==0:
       B.append(A[a])
       i=i+1
print(B)
for a in range(int(i)):
    if int(B[a])%3==0 or int(B[a])%5==0:
       n=n+1
print(n,i)
if n==i:
   print("APPROVED")
else:
   print("DENIED")


N = input()
A = list(map(str, input().split()))
B=[]
C=[]
l=[]
m=[]
n=0
i=0
for a in range(int(N)):
    if int(A[a])%2==0:
       B.append(A[a])
       i=i+1
for a in range(int(i)):
    if int(B[a])%3==0 or int(B[a])%5==0:
       n=n+1
if n==i:
   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):
# -*- coding: utf-8 -*-



n = input() # 2 ~ 99
an = []
an = input().split() 1 ~ 1000

ocunt = 0
for i in an:
  if i % 2 == 0:
    if i % 3 == 0 or i % 5 == 0:
      count += 1
      break:
if count == 1:
  print('APPROVED')
else:
  print('DENIED')

# -*- coding: utf-8 -*-
n = input() # 2 ~ 99
an = [int(x.strip()) for x in input().split(' ')]

count = 0
check = 0
for i in an:
  if i % 2 == 0:
    check += 1
    if i % 3 == 0 or i % 5 == 0:
      count += 1
if count == check or check == 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):
N=int(input())
S=[int(s) for s in input().split()]
for i in range(N):
    if S[i]%2==0 and S[i]%15!=0:
        print("DENIED")
    elif i==N-1:
        print("APPROVED")

N=int(input())
S=[int(s) for s in input().split()]
for i in range(N):
    if S[i]%2==0 and S[i]%5!=0 and S[i]%3!=0:
        print("DENIED")
        break
    elif i==N-1:
        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()))

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

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


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 and A[i] % 5 != 0):
            count += 1

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

for x in A:
  if x % 2 == 0:
    if not (x%3 and x%5):
      print("DENIED")
      break
      
else:
  print("APPROVED")

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

flag = 0

for i in A:
  if i%2==0 and (i%3 != 0 and i%5 != 0):
    flag = 1
    
if flag == 0:
  print("APPROVED")
  
else:
  print("DENIED")

Verdicts: Wrong Answer

Accepted