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):
admission = []
n = int(input())
admission.append(map,int(input().split()))

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

admission = []
n = int(input())
admission.append(map(int,input().split()))

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


admission = []
n = int(input())
admission.append(map(int,input().split()))

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


admission = []
n = int(input())
admission.append(map(int,input().split()))

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


admission = []
n = int(input())
admission.append(map(int,input().split()))

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


admission = []
n = int(input())
admission.append(map(int,input().split()))

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


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

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

admission = []
n = int(input())
admission.append(map(int,input().split()))

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

admission = []
n = int(input())
admission.append(map(int,input().split()))

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

admission = []
n = int(input())
admission.append(map(int,input().split()))

for i in range(n-1):
    if admission[n-1] % 2 == 0:
        if admission[n-1] % 3 == 0 or admission[n-1] % 5 == 0:
            print("APPROVED")
        else:
            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:
            print("APPROVED")
        else:
            print("DENIED")

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Accepted