ZhenlongDai/ACPR huggingface dataset:
Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math


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


n = int(input())
a = readints()


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


Failing test case input:
5
0 -5 17 4 538

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
import math


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


n = int(input())
a = readints()
x = 0
y = 0
for i in range(n):
    if a[i] % 2 == 0:
        x += 1
        if a[i] % 3 == 0 or a[i] % 5 == 0:
            y += 1
if x == y:
    print('APPROVED')
else:
    print('DENIED')

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = list(map(int , input().split()))
B = []
acount = 0
bcount = 0
for i in A:
    if i % 2 == 1:
         pass
    else:
        acount += 1
        B.append(i)
for i in B:
    if i % 3 == 0 or i % 5 == 0:
         bcount += 1
if acount != bcount:
    print('DENIED')
elif acount == 0:
    print('DENIED')
else:
    print('APPROVED')

Failing test case input:
5
-1 -1 1 1 385

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int , input().split()))
ans = []
bns = []
for i in A:
    if i % 2 == 0:
        ans.append(i)
for i in ans:
    if i % 3 == 0 or i % 5 == 0:
        bns.append(i)
if len(ans) == len(bns):
    print('APPROVED')
else:
    print('DENIED')

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int,input().split()))



count = 0
ok_count = 0
for i in range(len(a)):
    if a[i]%2  == 0:
        count += 1
        if a[i]%3 == 0 or a[i]%5 == 0 or a[i]%3 == 0 and a[i]%5 == 0:
            ok_count += 1
if count == ok_count:
    print('APPROVED')
else:
    print('DENIED5')

Failing test case input:
3
4 5 66

Expected output:
DENIED


Actual output:
DENIED5


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int,input().split()))



count = 0
ok_count = 0
for i in range(len(a)):
    if a[i]%2  == 0:
        count += 1
        if a[i]%3 == 0 or a[i]%5 == 0 or a[i]%3 == 0 and a[i]%5 == 0:
            ok_count += 1
if count == ok_count:
    print('APPROVED')
else:
    print('DENIED')

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = list(map(int, input().split()))
flag = True
for i in range(N-1):
    if A[i]%2==0 and A[i]%3!=0 and A[i]%5!=0:
        flag = False
        break
if flag==True:
    print('APPROVED')
else:
    print('DENIED')

Failing test case input:
5
0 -1 5 1 266

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int, input().split()))
flag = True
for i in range(N):
    if A[i]%2==0 and A[i]%3!=0 and A[i]%5!=0:
        flag = False
        break
if flag:
    print('APPROVED')
else:
    print('DENIED')
Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
n = int(sys.stdin.readline().rstrip())
li = list(map(int, sys.stdin.readline().split()))
li2 = []
for i in li:
  if not i % 2:
    li2.append(i)
if len(li2):
  flag = True
else:
  flag = False
for i in li2:
  if not i % 3 and i % 5:
    flag = False
    break
print('APPROVED' if flag else 'DENIED')


Failing test case input:
5
-1 -1 1 1 337

Expected output:
APPROVED


Actual output:
DENIED


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

Problem: p02772
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))

del a[n:]

new1 = [i for i in range(len(a)) if a[i] % 2 == 0]
new2 = [i for i in range(len(new1)) if (new1[i] % 3 == 0 or new1[i] % 5 == 0)]

if len(new1) == len(new2):
  print("APPROVED")
else:
  print("DENIED")

  

Failing test case input:
3
28 15 47

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int, input().split()))

del a[n:]

new1 = [a[i] for i in range(len(a)) if a[i] % 2 == 0]
new2 = [i for i in range(len(new1)) if (new1[i] % 3 == 0 or new1[i] % 5 == 0 or new1[i] % 15 == 0)]

if len(new1) == len(new2):
  print("APPROVED")
else:
  print("DENIED")

Problem: p02772
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys
n=int(input())
a=list(map(int,input().split()))

for i in a:
    if i%2!=0:
        a.remove(i)

for i in a:
    if i%3!=0:
        if i%5!=0:
            print('DENIED')
            sys.exit()
            
print('APPROVED')

Failing test case input:
5
-1 -1 1 1 337

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
import sys
n=int(input())
a=list(map(int,input().split()))
b=a[:]

for i in range(len(a)):
    if a[i]%2!=0:
        b.remove(a[i])

for i in b:
    if i%3!=0:
        if i%5!=0:
            print('DENIED')
            sys.exit()
            
print('APPROVED')

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=int(input())
b=list(map(int,input().split()))
count=0
for i in range (a):
 if b[i]%2==0 and b[i]%3!=0 and b[i]%5!=0:
  count=0
 else:count=1
if count==1:print("APPROVED")
else: print("DENIED")

Failing test case input:
3
4 5 99

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
a=int(input())
b=list(map(int,input().split()))
count=0
for i in range (a):
 if b[i]%2==0 and b[i]%3!=0 and b[i]%5!=0:
  count=0
  break
 else:count=1
if count==1:
 print("APPROVED")
else: print("DENIED")
Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = list(map(int, input().split()))
for i in range(N):
    print(i)
    print(A[i] % 2 == 0)
    print(A[i] % 3 != 0)
    print(A[i] % 5 != 0)
    if(A[i] % 2 == 0 and A[i] % 3 != 0 and A[i] % 5 != 0):
        print('DENIED')
        exit()
print('APPROVED')

Failing test case input:
5
-2 -3 1 1 150

Expected output:
DENIED


Actual output:
0
True
True
True
DENIED


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

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
aa = list(map(int, input().split()))

for a in aa:
    if n % 2 == 0 and not (n % 3 == 0 or n % 5 == 0):
        print("DENIED")
        exit(0)
print("APPROVED")

Failing test case input:
3
4 3 47

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
n = int(input())
aa = list(map(int, input().split()))

for a in aa:
    if a % 2 == 0 and not (a % 3 == 0 or a % 5 == 0):
        print("DENIED")
        exit(0)
print("APPROVED")

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = list(map(int, input().split()))

ans = "DENIED"
andflg = 1

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

print(ans)


Failing test case input:
3
-1 1 101

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int, input().split()))

ans = "APPROVED"
andflg = 1

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)

Problem: p02772
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
A = [int(i) for i in input().split()]

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

Failing test case input:
5
-1 -1 1 1 374

Expected output:
DENIED


Actual output:
APPROVED


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

if t == 0:
    print('APPROVED')
else:
    print('DENIED')
Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))

ans = 0

for i in range(n):
  if i % 2 == 0:
    if i % 3 != 0 or i % 5 != 0:
        ans += 1

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


Failing test case input:
3
1 1 010

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int, input().split()))

ans = 0

for i in range(n):
  ai = a[i]
  if ai % 2 == 0:
    if (ai % 3) * (ai % 5) != 0:
      ans += 1
      
if ans >= 1:
  print('DENIED')
else:
  print('APPROVED')

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
arr = [int(s) for s in input().split(" ")]


def calculate(n,arr):

    for ar in arr:
        if ar % 2 == 0:
            s1 = ar % 3
            s2 = ar % 5
            if (s1 == 0) or (s2 == 0):
                print("APPROVED")
                return
            else:
                print("DENIED")
                return

    print("DENIED")

calculate(n,arr)



Failing test case input:
5
0 -5 5 4 538

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
n = int(input())
arr = [int(s) for s in input().split(" ")]


def calculate(n,arr):

    for ar in arr:
        if ar % 2 == 0:
            s1 = ar % 3
            s2 = ar % 5
            if (s1 == 0) or (s2 == 0):
                pass
            else:
                print("DENIED")
                return

    print("APPROVED")

calculate(n,arr)

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
arr = []
arr = list(map(int, input().split()))
flag = 0
for i in range(n):
  num = arr[i]
  if num % 2 == 0:
    if (num % 6 == 0) or (num % 10 == 0):
      flag = 1
    else:
      flag = 0
    if flag == 1:
      print("APPROVED")
    else:
      print("DENIED")

Failing test case input:
5
6 7 9 10 31

Expected output:
APPROVED

Actual output:
APPROVED
APPROVED


Fixed submission (verdict: Accepted):
n = int(input())
arr = []
arr = list(map(int, input().split()))
flag = 0
count = 0
for i in range(n):
  num = arr[i]
  if num % 2 == 0:
    count += 1
    if(num % 6 == 0) or (num % 10 == 0):
      flag += 1
      
if flag == count:
    print("APPROVED")
else:
    print("DENIED")

Problem: p02772
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
data = list(input().split())
sw1 = 0
sw2 = 0
for i in range(0,len(data)):
    if int(data[i]) % 2 == 0:
        sw1 += 1
        if int(data[i]) % 3 == 0 or int(data[i]) % 5 == 0:
            sw2 += 1

if sw1 > 0 and sw1 == sw2:
    print("APPROVED")
else:
    print("DENIED")

Failing test case input:
5
-1 -1 1 1 337

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
N = int(input())
data = list(map(int,input().split()))
sw1 = 0
sw2 = 0
for i in range(0,len(data)):
    if data[i] % 2 == 0:
        sw1 += 1
        if data[i] % 3 == 0 or data[i] % 5 == 0:
            sw2 += 1

if sw1 >= 0 and sw1 == sw2:
    print("APPROVED")
else:
    print("DENIED")
Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = list(map(int, input().split()))
for i in range(N):
  if A[i] % 2 == 0:
    if A[i] % 3 != 0 and A[i] % 5 != 0:
      print('DENIED')
      break
print('APPROVED')

Failing test case input:
5
2 1 5 5 46

Expected output:
DENIED


Actual output:
DENIED
APPROVED


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int, input().split()))
key = 0
for i in range(N):
  if A[i] % 2 == 0:
    if A[i] % 3 != 0 and A[i] % 5 != 0:
      key += 1
if key > 0:
  print('DENIED')
else:
  print('APPROVED')

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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) or (num%5 == 0)
if approved:
  print('APPROVED')
else:
  print('DENIED')
  

Failing test case input:
3
2 0 100

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
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')

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = [int(s) for s in input().split()]
evenA = [i for i in A if i%2 == 0]
flg = True
for i in evenA:
  if i%3 != 0 and i%5 != 0:
    flg == False
if flg:
  print("APPROVED")
else:
  print("DENIED")

Failing test case input:
5
-2 -2 1 1 150

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
N = int(input())
A = [int(s) for s in input().split()]
evenA = [i for i in A if i%2 == 0]
flg = True
for i in evenA:
  if i%3 != 0 and i%5 != 0:
    flg = False
if flg:
  print("APPROVED")
else:
  print("DENIED")

Problem: p02772
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import math
import time
from collections import defaultdict, deque
from sys import stdin, stdout
from bisect import bisect_left, bisect_right
n=int(input())
a=list(map(int,stdin.readline().split()))
poss=True
for i in a:
    if(i%2==0):
        if(i%3!=0 or i%5!=0):
            poss=False
            break
if(poss):
    print("APPROVED")
else:
    print("DENIED")

Failing test case input:
3
1 0 010

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
import math
import time
from collections import defaultdict, deque
from sys import stdin, stdout
from bisect import bisect_left, bisect_right
n=int(input())
a=list(map(int,stdin.readline().split()))
poss=True
for i in a:
    if(i%2==0):
        if(i%3!=0 and i%5!=0):
            poss=False
            break
if(poss):
    print("APPROVED")
else:
    print("DENIED")
Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
lists = list(map(int, input().split()))

for i in lists:
    if i % 2 == 0:
        if i % 3 == 0:
            break

        elif i % 5 == 0:
            break

        else:
            print("DENIED")
            exit()

print("APPROVED")

Failing test case input:
5
0 -2 5 2 266

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
N = int(input())
lists = list(map(int, input().split()))

for i in lists:
    if i % 2 == 0:
        if i % 3 == 0:
            continue

        elif i % 5 == 0:
            continue

        else:
            print("DENIED")
            exit()

print("APPROVED")

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))

ans = 0

for i in range(n):
  if i % 2 == 0:
    if i % 3 == 0 or i % 5 == 0:
      pass
    else:
      ans += 1
      break

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

Failing test case input:
5
-1 -1 1 1 200

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int, input().split()))

ans = 0

for i in range(n):
  ai = a[i]
  if ai % 2 == 0:
    if (ai % 3) * (ai % 5) != 0:
      ans += 1
      
if ans >= 1:
  print('DENIED')
else:
  print('APPROVED')

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
rangeNum = int(input())
n = list(map(int, input().split()))

ans = True
for ni in range(rangeNum):
    if n[ni] % 2 == 0:
        if n[ni] % 3 == 0:
            break
        elif n[ni] % 5 == 0:
            break
        else:
            asn = False
    else:
        asn = False
if ans:
    print("APPROVED")
else:
    print("DENIED")

Failing test case input:
5
-1 -5 0 4 538

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
rangeNum = int(input())
n = list(map(int, input().split()))

for ni in range(rangeNum):
    if n[ni]%2 == 0:
        if n[ni]%3 == 0:
            continue
        elif n[ni]%5 == 0:
            continue
        else:
            print("DENIED")
            exit()
    else:
        continue
print("APPROVED")

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int,input().split()))
c = 0
for i in a:
  if i % 2 == 0:
    if i % 3 != 0 and i % 5 != 0:
      c += 0
if c == 0:
  print("APPROVED")
else:
  print("DENIED")

Failing test case input:
5
1 1 4 5 31

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int,input().split()))
c = 0
for i in a:
  if i % 2 == 0:
    if i % 3 != 0 and i % 5 != 0:
      c += 1
if c == 0:
  print("APPROVED")
else:
  print("DENIED")
Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = list(int(x) for x in input().split())
found = True

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

if found:
    print('APPRPVED')
else:
    print('DENIED')


Failing test case input:
5
-1 -1 1 1 321

Expected output:
APPROVED


Actual output:
APPRPVED


Fixed submission (verdict: Accepted):
N = int(input())
A = list(int(x) for x in input().split())
found = True

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

if found:
    print('APPROVED')
else:
    print('DENIED')

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a_list = list(map(int, input().split()))

a_list_even = [i for i in a_list if i % 2 == 0]

for a in a_list_even:
    if a % 3 == 0 or a % 5 == 0:
        pass
    else:
        print("DENIDE")
        exit()

print("APPROVED")

Failing test case input:
5
-4 -1 1 4 374

Expected output:
DENIED


Actual output:
DENIDE


Fixed submission (verdict: Accepted):
n = int(input())
a_list = list(map(int, input().split()))

a_list_even = [i for i in a_list if i % 2 == 0]
for a in a_list_even:
    if a % 3 == 0 or a % 5 == 0:
        continue
    else:
        print("DENIED")
        exit()

print("APPROVED")

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
list=list(map(int,input().split()))
ans=1
for i in range(len(list)):
    if list[i]%2==0:
        if list[i]%3==0 or list[i]%5==0:
            ans=0
        else:
            ans=1
            break
print("APPROVED" if ans==0 else "DENIED")

Failing test case input:
3
-1 1 101

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
n=int(input())
list=list(map(int,input().split()))
ans=0
for i in range(len(list)):
    if list[i]%2==0:
        if list[i]%3==0 or list[i]%5==0:
            ans=0
        else:
            ans=1
            break
print("APPROVED" if ans==0 else "DENIED")

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())

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

lst = []

flg = False

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

for i in range(len(lst)):
    if lst[i] % 3 == 0 or lst[i] % 5 == 0:
        flg = True
    else:
        flg = False
        break

if flg == True:
    print('APPROVED')
else:
    print('DENIED')

Failing test case input:
3
-1 1 101

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
n = int(input())

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

lst = []

flg = True

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

for i in range(len(lst)):
    if lst[i] % 2 == 0 and lst[i] % 3 == 0 or lst[i] % 5 == 0:
        flg = True
    else:
        flg = False
        break

if flg == True:
    print('APPROVED')
else:
    print('DENIED')
Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=int(input())
list=list(input().split())

for i in range(a):
  if int(list[i])%2 == 0:
    if int(list[i])%3 !=0 and int(list[i])%5 !=0:
      print('DENIED')

print('APPROVED')
    

Failing test case input:
5
-2 -1 1 1 385

Expected output:
DENIED


Actual output:
DENIED
APPROVED


Fixed submission (verdict: Accepted):
a=int(input())
list=list(input().split())
result=1
for i in range(a):
  if int(list[i])%2 == 0:
    if int(list[i])%3 !=0 and int(list[i])%5 !=0:
      print('DENIED')
      result=0
      break
if result != 0:
	print('APPROVED')

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = input()
num = [int(x) for x in input().split()]
flag = True
for x in num:
  if x % 2 == 0:
    if x % 3 != 0 and x % 5 != 0:
      flag = False
if flag:
  print('APPROVE')
else:
  print('DENIED')

Failing test case input:
3
0 0 100

Expected output:
APPROVED


Actual output:
APPROVE


Fixed submission (verdict: Accepted):
a = input()
num = [int(x) for x in input().split()]
flag = True
for x in num:
  if x % 2 == 0:
    if x % 3 != 0 and x % 5 != 0:
      flag = False
if flag:
  print('APPROVED')
else:
  print('DENIED')

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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')

Failing test case input:
3
-1 1 100

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
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')

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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")


Failing test case input:
3
4 5 99

Expected output:
DENIED


Actual output:
['4']
0 1
DENIED


Fixed submission (verdict: Accepted):
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")

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
L=list(map(int,input().split()))
M=[]
for i in L:
  if i%2==0:
    M.append(i)
A='APPROVED'
for k in M:
  if k%3!=0 or k%5!=0:
    A='DENIED'
    break
print(A)

    
  

Failing test case input:
3
0 1 010

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
N=int(input())
L=list(map(int,input().split()))
M=[]
for i in L:
  if i%2==0:
    M.append(i)
A='APPROVED'
for k in M:
  if k%3!=0 and k%5!=0:
    A='DENIED'
    break
print(A)
Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
3
1 0 110

Expected output:
APPROVED


Actual output:
1
0
APPROVED


Fixed submission (verdict: Accepted):
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)

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = list(map(int, input().split()))
a.pop(0)
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")

Failing test case input:
5
-1 7 4 10 31

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
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")

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = [int(x) for x in input().split()]
p = 0
for i in range(n):
    
    if a[i]%2 == 0 and a[i]%3 != 0:
        p += 1
    else:
        p = p
    if a[i]%2 == 0 and a[i]%5 != 0:
        p += 1
    else:
        p = p
if p > 0:
    print("DENIED")
else:
    print("APPROVED")


Failing test case input:
3
3 0 110

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
n = int(input())
a = [int(x) for x in input().split()]
p = 0
for i in range(n):
    if a[i]%2 == 0:
        if a[i]%3 != 0 and a[i]%5 != 0:
            p += 1
if p > 0:
    print("DENIED")
else:
    print("APPROVED")

Problem: p02772
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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)


Failing test case input:
3
-1 1 100

Expected output:
APPROVED


Actual output:
APPOROVED


Fixed submission (verdict: Accepted):
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)
Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
5
0 -1 5 1 252

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
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)

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
a_list = list(map(int, input().split()))
c = 0
for i in range(N):
    if a_list[i] % 2 == 0:
        if a_list[i] % 3 == 0:
            a = 1
        elif a_list[i] % 5 == 0:
            a = 1
        else:
            c = 1
    else:
        a = 1
    

if c == 1:
    print("DENID")
else:
    print("APPROVED")

Failing test case input:
3
1 2 100

Expected output:
DENIED


Actual output:
DENID


Fixed submission (verdict: Accepted):
N = int(input())
a_list = list(map(int, input().split()))
c = 0

for i in range(N):
    if a_list[i]  % 2 != 0:
        a = 1
    else:
        if (a_list[i] % 3 != 0) and (a_list[i] % 5 != 0):
            c = 1
        else:
            a = 1


if c == 1:
    print("DENIED")
else:
    print("APPROVED")

Problem: p02772
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))

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

print('APPROVED')

Failing test case input:
3
28 27 24

Expected output:
DENIED

Actual output:
DENIED
APPROVED


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int, input().split()))

for num in a:
    if num % 2 == 0:
        if num%3==0 or num%5==0:
            pass
        else:
            print('DENIED')
            exit()

print('APPROVED')

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
applist = list(map(int, input().split()))

applist.append(N)
 
flag = 0
for i in applist:
  if i % 2 == 0:
    if i % 3 == 0 or i % 5 == 0:
      flag = 1
    else:
      flag = 0
      break

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

Failing test case input:
5
-1 -1 1 1 321

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
N = int(input())
applist = list(map(int, input().split()))

newlist = []
for i in applist:
  if i % 2 == 0:
    newlist.append(i)

flag = 0
for j in newlist:
  if j % 3 == 0 or j % 5 == 0:
    flag = 0
  else:
    flag = 1
    break

if flag == 0:
  print("APPROVED")
else:
  print("DENIED")
Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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')

Failing test case input:
3
4 5 69

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
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')

Problem: p02772
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))
b=0
for i in range(n):
  if a[i]%2==0 and a[i]%3==0 or a[i]%5==0:
      b+=1
print('APPROVED' if b>=1 else 'DENNIED')

Failing test case input:
5
-1 -5 0 4 374

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int, input().split()))
b=0
for i in range(n):
  if a[i]%2==0 and a[i]%3!=0 and a[i]%5!=0:
      b+=1
print('APPROVED' if b==0 else 'DENIED')

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int,input().split()))
b = []
wk = wk1 = 0

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

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

Failing test case input:
3
2 0 100

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int,input().split()))
b = []
wk = wk1 = 0

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

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

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
A=list(map(int,input().split()))

flag=0

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

Failing test case input:
3
1 0 010

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
N=int(input())
A=list(map(int,input().split()))

flag=0

for i in range(N):
  if A[i]%2==0:
    if A[i]%3>0 and A[i]%5>0:
      flag=1
      break
if flag==1:
  print("DENIED")
else:
  print("APPROVED")
Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
l=[]
a=[]
b=[]
for i in range(n):
    m=[int(j) for j in input().split()]
    
    for k in m:
        if k%2==0:
            l.append(k)

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

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

Failing test case input:
5
1 2 5 5 46

Expected output:
DENIED


Actual output:
DENIDE


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

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = input()
y = input()
list = y.split()
even_list = []
result = ''

for i in list:
  i = int(i)
  if i % 2 == 0:
    even_list.append(i)
    
for y in even_list:
  if y % 3 == 0 or y % 5 == 0:
    result = "APROVED"
  else:
    result = "DENIED"
    break
    
print(result)


Failing test case input:
3
-1 0 100

Expected output:
APPROVED


Actual output:
APROVED


Fixed submission (verdict: Accepted):
x = input()
y = input()
list = y.split()
even_list = []
result = ''

for i in list:
  i = int(i)
  if i % 2 == 0:
    even_list.append(i)
  else:
    result = "APPROVED"
    
for y in even_list:
  if y % 3 == 0 or y % 5 == 0:
    result = "APPROVED"
  else:
    result = "DENIED"
    break
    
print(result)

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
i1 = int(input())
i2 = list(map(int, input().split()))
    
l = []
for i in range(i1):
  if i2[i] % 2 == 0:
    if i2[i] % 3 == 0 or i2[i] % 5 == 0:
        l.append('APPROVED')
    else:
        l.append('DENEID')
    break
    
if (all(str == 'APPROVED' for str in l)):
	print('APPROVED')
else:
  	print('DENIED')

Failing test case input:
3
0 2 101

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
i1 = int(input())
i2 = list(map(int, input().split()))
    
l = []
for i in range(i1):
  if i2[i] % 2 == 0:
    if i2[i] % 3 == 0 or i2[i] % 5 == 0:
        l.append('APPROVED')
    else:
        l.append('DENEID')
    
if (all(str == 'APPROVED' for str in l)):
	print('APPROVED')
else:
  	print('DENIED')
Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))
for i in range(n):
    if a[i]%2 == 0:
        if a[i]%5 != 0 or a[i]%3 != 0:
            print("DENIED")
            exit()
print("APPROVED")

Failing test case input:
3
1 1 100

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int, input().split()))
for i in range(n):
    if a[i]%2 == 0:
        if a[i]%5 == 0 or a[i]%3 == 0:
            pass
        else:
            print("DENIED")
            exit()
print("APPROVED")

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))
count = True
for i in range(n-1):
    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')

Failing test case input:
5
-1 -1 1 1 166

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int, input().split()))
flg = True
for a in A:
  if a % 2 == 0:
    if a % 3 != 0 and a % 5 != 0:
      flg = False
      break
if flg:
  print('APPROVED')
else:
  print('DENIED')

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a_list = list(map(int, input().split()))
flag = "ok"
for i in a_list:
  if i%2 == 0: 
    if i%3 != 0 or i%5 != 0:
      flag = "ng"
if flag == "ok":
  print("APPROVED") 
else:
  print("DENIED")


Failing test case input:
5
0 0 5 1 252

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
n = int(input())
a_list = list(map(int, input().split()))
flag = "ok"
for i in a_list:
  
  if i%2 == 0: 
    if i%3 != 0 and i%5 != 0:
      flag = "ng"
if flag == "ok":
  print("APPROVED") 
else:
  print("DENIED")

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def solve():
    X = list(map(int, input().split()))
    for x in X:
        if x%2 != 0:
            continue
        elif x%3 != 0 and x%5 != 0:
            return "DENIED"
    return "APPROVED"

print(solve())

Failing test case input:
5
0 -5 5 2 266

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
def solve():
    N = int(input())
    X = list(map(int, input().split()))
    for x in X:
        if x%2 == 0 and x%3 != 0 and x%5 != 0:
            return "DENIED"
    return "APPROVED"

print(solve())
Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
arr = []
arr = input().split() 
arr = [int(l) for l in arr]
even = [l for l in arr if l % 2 == 0]      
count = 0
for i in even: 
    if i % 3 == 0 or i % 5 == 0:
        count += 1
if count >= 1: 
    print("APPROVED")
else: 
    print("DENIED")

Failing test case input:
5
2 0 5 5 46

Expected output:
DENIED


Actual output:
APPROVED


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

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
A=list(map(int,input().split()))
ret='APPROVED'
for i in A:
  if i%2==0 and (i%3==0 or i%5==0):
    continue
  else:
    ret='DENIED'
    break
print(ret)

Failing test case input:
3
0 0 101

Expected output:
APPROVED


Actual output:
DENIED


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

Problem: p02772
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
len=int(input())
list = input().split(" ")
msg="DENIED"
for i in range(len):
  if int(list[i])%2==0 and (int(list[i])%3==0 or int(list[i])%5==0):
    msg="APPROVED"
  elif int(list[i])%3==0 or int(list[i])%5==0:
    msg="APPROVED"
  else:
    msg="DENIED"
    break
  
print(msg)

Failing test case input:
3
0 1 100

Expected output:
APPROVED


Actual output:
DENIED


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

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
s = [int(x) for x in list(input().split()) if int(x)%2 == 0]
ans = "APPROVED"
for i in s:
  if not i%5 != 0:
    ans = "DENIED"
    pass
  if not i%3 != 0:
    ans = "DENIED"
    pass
print(ans)


Failing test case input:
5
1 1 4 5 31

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
n = int(input())
s = [int(x) for x in list(input().split()) if int(x)%2 == 0]
ans = "APPROVED"
for i in s:
  if i%5 != 0 and i%3 != 0:
    ans = "DENIED"
    pass
print(ans)
Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def f(n: int) -> bool:
    if n % 2 == 0:
        if n % 3 == 0 or n % 5 == 0:
            return True
        else:
            return False
    else:
        return True


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

if all(map(f, A)):
    print("APPROVED")
else:
    print("DINED")


Failing test case input:
3
-1 2 101

Expected output:
DENIED


Actual output:
DINED


Fixed submission (verdict: Accepted):
def f(n: int) -> bool:
    if n % 2 == 0:
        if n % 3 == 0 or n % 5 == 0:
            return True
        else:
            return False
    else:
        return True


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

if all(map(f, A)):
    print("APPROVED")
else:
    print("DENIED")

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
list = input().split()
for i in range(N):
  on = 0
  k = int(list[i])
  if k % 2 == 0:
    if k % 3 == 0 or k % 5 == 0:
      on = 1 
    else:
      print("DENIED")
      break
  if i == N-1:
    if on == 1:
  	   print("APPROVED")
    else:
 	   print("DENIED")

Failing test case input:
3
-1 0 101

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
N = int(input())
list = input().split()
on = 0
for i in range(N):
  k = int(list[i])
  if k % 2 == 0:
    if k % 3 == 0 or k % 5 == 0:
      on = 1 
    else:
      print("DENIED")
      break
  if i == N-1:
  	print("APPROVED")

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
l = list(map(int, input().split()))

check_list = []
for num in l:
    if num % 2 == 0:
        check_list.append(num)

n = len(check_list)
i = 0
while i < n:
    if (check_list[i] % 2 == 0) or (check_list[i] % 3 == 0):
        i += 1
    else: break
if i == n:
    print('APPROVED')
else: print('DENIED')

Failing test case input:
5
0 -5 9 4 538

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
N = int(input())
l = list(map(int, input().split()))
 
check_list = []
for num in l:
    if num % 2 == 0:
        check_list.append(num)
 
n = len(check_list)
i = 0
while i < n:
    if (check_list[i] % 3 == 0) or (check_list[i] % 5 == 0):
        i += 1
    else: break
if i == n:
    print('APPROVED')
else: print('DENIED')

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))
count = 0
ans = 0
for i in a:
    if i%2 == 0:
        count += 1
        if i%3 == 0 or i%5 == 0:
            ans += 1
if count == ans:
    print('APPROVED')
else:
    print('DEFINED')

Failing test case input:
5
2 0 5 5 46

Expected output:
DENIED


Actual output:
DEFINED


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int, input().split()))
count = 0
ans = 0
for i in a:
    if i%2 == 0:
        count += 1
        if i%3 == 0 or i%5 == 0:
            ans += 1
if count == ans:
    print('APPROVED')
else:
    print('DENIED')
Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))
flg = True
for i in range(n):
    if a[i] % 2 == 0:
        if a[i] % 3 == 0 or a[i] % 5 == 0:
            pass
    else:
        flg = False
        break

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



Failing test case input:
3
2 8 16

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int, input().split()))
flg = True
for i in range(n):
    if a[i] % 2 == 0:
        if a[i] % 3 == 0 or a[i] % 5 == 0:
            pass
        else:
            flg = False
            break

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

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = input().split()
A = [int(i) for i in A]
t = 0
for i in range(N-1):
  if A[i] % 2 == 0:
    if A[i]%3 !=0 and A[i]%5 != 0:
      t += 1
if t == 0:
  print("APPROVED")
else:
  print("DENIED")

Failing test case input:
5
-1 -1 1 1 166

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
N = int(input())
A = input().split()
A = [int(i) for i in A]
t = 0
for i in range(N):
  if A[i] % 2 == 0:
    if A[i]%3 != 0 and A[i]%5 != 0:
      t += 1
    else:continue
  else:continue
if t == 0:
  print("APPROVED")
else:
  print("DENIED")

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = list(map(int,input().split(" ")))
S = []
for a in A:
    if a % 2 == 0:
        S.append(a)
    else:
        pass
flag = True
for s in S:
    if s % 3==0 or s% 5==0:
        if s % 15 == 0:
            flag=False
        else:
            pass
    else:
        flag = False
if flag==True:
    print("APPROVED")
if flag == False:
    print("DENIED")

Failing test case input:
3
0 1 010

Expected output:
APPROVED


Actual output:
DENIED


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int,input().split(" ")))
S = []
for a in A:
    if a % 2 == 0:
        S.append(a)
    else:
        pass
flag = True
for s in S:
    if s % 3==0 or s% 5==0:
        pass
    else:
        flag = False
if flag==True:
    print("APPROVED")
if flag == False:
    print("DENIED")

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = [int(i) for i in input().split()]

count = 0
for i in A:
  if i % 2 == 0:
    if i % 3 != 0 and i % 5 != 0:
      count += 1
  else:
    break

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

Failing test case input:
5
1 2 4 5 46

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
N = int(input())
A = [int(i) for i in input().split()]

count = 0
for i in A:
  if i % 2 == 0:
    if i % 3 != 0 and i % 5 != 0:
      count += 1

if count == 0:
  print('APPROVED')
else:
  print('DENIED')
Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
a=[int(i) for i in input().split()]
count=0
for i in a:
    if i%2==0:
        if i%3!=0 or i%5!=0:
            count+=1
            break
if count==0:
    print("APROVED")
else:
    print("DENIED")
            



Failing test case input:
5
-1 -1 1 1 200

Expected output:
APPROVED


Actual output:
DENIED


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

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
a=[int(i) for i in input().split()]
count=0
for i in a:
    if i%2==0:
        if i%3!=0 or i%5!=0:
            count+=1
            break
if count==0:
    print("APPROVED")
else:
    print("DENIED")
            



Failing test case input:
3
1 1 100

Expected output:
APPROVED


Actual output:
DENIED


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

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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')



Failing test case input:
3
-1 0 100

Expected output:
APPROVED


Actual output:
APPROVE


Fixed submission (verdict: Accepted):
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')

Problem: p02772
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
FLG=1

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

for i in range(N):
  if n[i]/2 == 0:
    if n[i]/3 != 0:
      FLG=0
    if n[i]/5 != 0:
      FLG=0
   
if FLG == 0:
  ans = "DENIED"
else:
  ans = "APPROVED"

print(ans)

Failing test case input:
3
2 0 010

Expected output:
DENIED


Actual output:
APPROVED


Fixed submission (verdict: Accepted):
N = int(input())
FLG=1

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

for i in range(N):
  if n[i]%2 == 0:
    
    if n[i]%3 != 0:
      if n[i]%5 != 0:
        FLG=0
   
if FLG == 0:
  ans = "DENIED"
else:
  ans = "APPROVED"

print(ans)