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

Submission attempts (in order):
n=int(input())
l=list(map(int,input().split()))
for i in l:
    if i%2==0 and i%3!=0 and i%5==0:
        print("DENIED")
        exit()
print("APPROVED")

n=int(input())
l=list(map(int,input().split()))
for i in l:
    if i%2==0 and i%3!=0 or i%5==0:
        print("DENIED")
        exit()
print("APPROVED")

n=int(input())
l=list(map(int,input().split()))
for i in l:
    if i%2==0 and i%3!=0 and i%5!=0:
        print("DENIED")
        exit()
print("APPROVED")

Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
number = str(input())
list = list(map(int, input().split())
for i in list:
	if i%2==0:
		if i%3==0 or i%5==0:
            print("APPROVED")
        else:
            print("DENIED")

number = input()
list1 = list(map(int, input().split()))
han = 0
count = 0
for i in range(0, len(list1)):
    if list1[i]%2 == 0:
        count += 1
        if list1[i]%3 == 0 or list1[i]%5 == 0:
            han += 1
if han == count:
    print("APPROVED")
else:
    print("DENIED")

Verdicts: Runtime Error

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

Submission attempts (in order):
import sys
n = int(input())
a = list(map(int, input().split()))

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

print("APPROVED")



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

for i in range(n):
    if a[i] % 2 == 0:
        if a[i] % 3 and a[i] % 5 != 0:
            print("DENIED")
            sys.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):
# Papers, Please

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

for Ai in A:
  if Ai % 2 == 1:
    continue
  else:
    if Ai % 3 != 0 and Ai % 5 != 0:
      print("DENIED")
      exit()

print("AOOROVED")

# Papers, Please

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

for Ai in A:
  if Ai % 2 == 1:
    continue
  else:
    if Ai % 3 != 0 and Ai % 5 != 0:
      print("DENIED")
      exit()

print("APPROVED")

Verdicts: Wrong Answer

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

Submission attempts (in order):
n = int(input())
a = list(int(x) for x in input().split() if int(x)%2==0)
ok = True
for i in a:
  if i%3==0 or i%5==0:
    print('DENIED')
    ok = False
    break
if ok:
  print('APPROVED')

n = int(input())
a = list(int(x) for x in input().split() if int(x)%2==0)
ok = True
for i in a:
  if i%3!=0 and i%5!=0:
    print('DENIED')
    ok = False
    break
if ok:
  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()))
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")



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



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


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

n=0

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

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

N = int(input())

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

for i in range(N):
    a=A[i]
    if a%2==0 and (a%3!=0 or a%5!=0):
        print("DENIED")
        break

print("APPROVED")

N = int(input())

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

for i in N:
    a=A[i]
    if a%2==0 and (a%3!=0 or a%5!=0):
        print("DENIED")
        break

print("APPROVED")

N = int(input())

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

for i in range(N):
    a=A[i]
    if a%2==0 and (a%3!=0 or a%5!=0):
        print("DENIED")
    
    break

print("APPROVED")

N = int(input())

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

n=0

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

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

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

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

Submission attempts (in order):
N = int(input())
A = list(map(int,input().split()))
li = []
ans = "APPROVED"

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

for i in li:
  if i % 5 == 0 or i % 3 == 0:
    ans = "APPROVED"
  else:
    ans = "DENIED"
    break

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

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

for i in li:
  if i % 5 == 0 or i % 3 == 0:
    ans = "APPROVED"
  else:
    ans = "DENIED"
    break
print(ans)

Verdicts: Wrong Answer

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

Submission attempts (in order):
n = int(input())
list = [int(x) for x in input().split(" ")]
result = 'APPROVED'
for i in range(len(list)):
    if list[i]%2 == 0:
        if list[i]%3!=0 AND list[i]%5!=0:
            result = 'DENIED'
            break
print(result)

n = int(input())
list = [int(x) for x in input().split(" ")]
result = 'APPROVED'
for i in range(len(list)):
    if list[i]%2 == 0:
        if list[i]%3 != 0 and list[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):
N = int(input())
lst = input().split(' ')
good = False
for v in lst:
  if int(v) % 2 != 0:
    continue
  elif int(v) % 3 != 0 and int(v) % 5 != 0:
    print('DENIED')
    break
  else:
    good = True
if good:
  print('APPROVE')

N = int(input())
lst = input().split(' ')
for v in lst:
  good = False
  if int(v) % 2 != 0:
    good = True
  elif int(v) % 3 != 0 and int(v) % 5 != 0:
    print('DENIED')
    break
  else:
    good = True
if good:
  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 = [int(i) for i in input().split()]
print('APPROVED' if all([a % 6 == 0 or a % 10 == 0 for a in A]) else 'DENIED')

N = int(input())
A = [int(i) for i in input().split()]
conditions = [(a % 3 == 0 or a % 5 == 0) for a in A if a % 2 == 0]
print('APPROVED' if all(conditions) 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):

num = input()
a = input().split()
flag = 0
for item in a:
    if item%2==0:
        if item%3==0 or item%5==0:
            pass
        else:
            flag=1

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


num = input()
a = input().split()
flag = 0
for item in a:
    item=int(item)
    if item%2==0:
        if item%3==0 or item%5==0:
            pass
        else:
            flag=1

if flag==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())
A = [int(i) for i in input().split()]
ans = True
for a in A:
  if a%2==0:
    if a%3!=0 or a%5!=0:
      ans = False
if ans:
  print("APPROVED")
else:
  print("DENIED")
      

N = int(input())
A = [int(i) for i in input().split()]
ans = True
for a in A:
  if a%2==0:
    if a%3!=0 and a%5!=0:
      ans = False
if ans:
  print("APPROVED")
else:
  print("DENIED")

Verdicts: Wrong Answer

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

Submission attempts (in order):
n=int(input())
a=list(map(int,input().split()))
x=0
for i in range(n):
    if a[i]%2==0:
        if a[i]%3!=0 and a[i]%3!=0:
            x=1
            break
if x==1:
    print('DENIED')
else:
    print('APPROVED')
        

n=int(input())
a=list(map(int,input().split()))
x=0
for i in range(n):
    if a[i]%2==0:
        if a[i]%3!=0 and a[i]%5!=0:
            x=1
            break
if x==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 = input()
_list = input().split(" ")
_list = [int(a) for a in _list]
aspect = [a for a in _list if a % 2==0]
ans = []
for a in even:
    if a % 3 == 0 or a % 5 == 0:
        ans.append(True)
if len(aspect) ==len(ans):
    print("APPROVED")
else:
    print("DENIED")

N = input()
_list = input().split(" ")
_list = [int(a) for a in _list]
aspect = [a for a in _list if a % 2==0]
ans = []
for a in aspect:
    if a % 3 == 0 or a % 5 == 0:
        ans.append(True)
if len(aspect) ==len(ans):
    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 = input()
A = [x for x in input().split()]
five = False
three = False
for x in range(A):
  if(x%5==0):
    five = True
  elif(x%3==0):
    three = True
    
if(five.equals(True) and three.equals(True)):
   print("APPROVED)
else:
   print("DENIED")
  


N = input()
A = [x for x in input().split()]
five = False
three = False
for x in range(A):
  if(x%5==0):
    five = True
  elif(x%3==0):
    three = True
    
if(five.equals(True) and three.equals(True):
   print("APPROVED)
else:
   print("DENIED")
  


N = input()
_list = input().split(" ")
_list = [int(x) for x in _list]
even = [x for x in _list if x % 2==0]
answer = []
for x in even:
    if x % 3 == 0 or x % 5 == 0:
        answer.append(True)
if len(even) == len(answer):
    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())
A = list(map(int, input().split()))

j = True
for i in range(N):
    if A[i] % 2 == 0:
        if A[i] %3 == 0 or A[i] % 5 ==0:
            pass
        else:
            j = False
            exit()
            
if j == Ture:
    print("APPROVED")
else:
    print("DENIED") 

N = int(input())
A = list(map(int, input().split()))
 
j = True
for i in range(N):
    if A[i] % 2 == 0:
        if A[i] %3 == 0 or A[i] % 5 ==0:
            pass
        else:
            print("DENIED") 
            exit()
            
print("APPROVED")

Verdicts: Runtime Error

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

Submission attempts (in order):

N = int(input())


input_list = input().split( )

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


N = int(input())


input_list = input().split( )

counter = 0

for i in range(N):
  if(int(input_list[i])%2==0):
    if((int(input_list[i])%3==0)or(int(input_list[i])%5==0)):
      counter = counter + 1
  else:
    counter = counter + 1
if(counter == N):
  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):



#include <array>
#include <set>
#include <cmath>
#include <string>
#include <sstream>

#include <list>
#include <stack>

#include <algorithm> 
#include <numeric>  
#include <functional>

#include <bitset>
#include <cctype>  
#include <iomanip> 
#include <limits>  

// std::numeric_limits<int>::max(), min()
// std::setprecision(X)
// std::islower(), std::isupper(), std::tolower, std::toupper
// std::accumulate(m.begin(), m.end(), 0LL);
// std::sort(begin(),end()) // 0, 1, 2, 3 ,4 (default, less);
// std::priority_queue<int, vector<int>, less<int>> que; // 4, 3, 2, 1 (defualt, less) : 
// if ( std::regex_match(S, std::regex("(dream|dreamer|erase|eraser)*")) ) std::cout << "YES" << std::endl;
 


#define all(x) (x).begin(),(x).end()

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
typedef long long ll;
typedef std::vector<int> vi;
typedef std::vector<std::vector<int>> vvi;

ll gcd ( ll a, ll b ) { if ( b == 0 ) return a; else return gcd ( b, a%b ); }
ll lcm ( ll a, ll b ) { return a * b / gcd(a, b); }


int main (void) {
  std::cin.tie(0);  std::ios::sync_with_stdio(false);

  return 0;
}



import numpy as np

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

#mask = a%6==0 or a%10==0 or a%2==1 
mask = np.logical_or.reduce( (a%6==0 , a%10==0, a%2==1) )
if mask.all() : 
    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())
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")

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

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

N = int(input())
list = input().split()
for i in range(N):
  on = 0
  k = int(list[i])
  print(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("DENNIED")

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

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

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

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

n = int(input())
li = list(map(int,input().split()))
error = 0
for i in range(n):
  if li[i]%2 == 0:
    if li[i]%3 == 0 or li[i]%5 == 0:
      pass
    else:
      error = 1
  else:
    pass
if error:
  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 = input().split()
A = [int(a) for a in A]

ans = 'APPROVED'
for a in A:
  if a % 2 ==0:
    if a % 3 != 0 or a % 5 != 0:
      ans = 'DENIED'
      break
      
print(ans)


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

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

N = int(input())
A = input().split()
A = [int(a) for a in A if int(a) % 2 == 0]

tmp = 0

for a in A:
  if a % 3 == 0 or a % 5 == 0:
    tmp += 1

if tmp == len(A):
  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):
import numpy as np
n = int(input())
a = list(map(int, input().split()))
a = np.array(a)
a = a[a%2==0]

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

return print("DENIED")

import numpy as np
import sys

n = int(input())
a = list(map(int, input().split()))
a = np.array(a)
a = a[a%2==0]

for i, j  in enumerate(a):
    if j%3 != 0 and j%5 != 0:
        print("DENIED")
        sys.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):
a = input()
b = list(map(int,input().split()))

for i in b:
  if i % 2 == 0:
    if i % 3 == 0 or i % 5 == 0:
      print("APPROVED")
    else:
      print("DENIED")
  else:
    print("DENIED")
    




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

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

Verdicts: Runtime Error

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

Submission attempts (in order):
N = int(input())
A = list(map(int, input().split()))
count = 0
for i in A:
  if i//3 == 0 or i//5 == 0:
    count += 1
  else:
    count += 0
    
if count == N:
  print('APPROVED')
else:
  print('DENIED')

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
n=int(input())
a=list(map(int,input().split()))
cnt=0
while True:
    if cnt>=n:
        print('DENIED')
        break
        
    elif a[cnt]%2==0:
        if a[cnt]%3==0 or a[cnt]%5==0:
            cnt+=1
            continue
        else:
            print('DENIED')
            break
    elif cnt==n:
        print('APPROVED')
        break
    else:
        cnt+=1
        continue
    

n=int(input())
a=list(map(int,input().split()))
cnt=0
while True:
    if cnt>=n:
        print('APPROVED')
        break
        
    elif a[cnt]%2==0:
        if a[cnt]%3==0 or a[cnt]%5==0:
            cnt+=1
            continue
        else:
            print('DENIED')
            break
    elif cnt==n:
        print('APPROVED')
        break
    else:
        cnt+=1
        
        continue
    

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

is_approved = True
for l in li :
    if (l % 2 != 0) :
        continue

    if (l % 2 == 0 and l % 3 == 0 and l % 5 == 0) :
        continue

    is_approved = False
    break

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



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

is_approved = True
for l in li :
    if (l % 2 != 0) :
        continue

    if (l % 3 == 0 or l % 5 == 0) :
        continue

    is_approved = False
    break

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



n=int(input())
l=list(map(int,input().split()))
f=1
for i in range(n):
    if  l[i]%2==0:
        if l[i]%3 and l[i]%5 :
            f=0
            break
if 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):
N = int(input())
oddNum = set()

for x in list(map(int, input().split())):
    if (x % 2 == 0):
        oddNum.add(x)

if (len(oddNum) == 0):
    print("DENIED")

for o in range(len(oddNum)):
    if ((o % 3 != 0) | (o % 5 != 0)):
        print("DENIED")
        exit()

print("APPROVED")

N = int(input())
oddNum = set()

for x in list(map(int, input().split())):
    if (x % 2 == 0):
        oddNum.add(x)

for o in range(len(oddNum)):
    if ((o % 3 != 0) | (o % 5 != 0)):
        print("DENIED")
        exit()

print("APPROVED")

N = int(input())
oddNum = set()

for x in list(map(int, input().split())):
    if (x % 2 == 0):
        oddNum.add(x)

for o in oddNum:
    if ((o % 3 != 0) & (o % 5 != 0)):
        print("DENIED")
        exit()

print("APPROVED")

Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
N = int(input())
X = [int(x) for x in input().split()]
print(X)
result = list(filter(lambda x: x % 2 == 0, X))
count = 0
for i in result:
    if i % 3 == 0 or i % 5 == 0:
        count += 1
print('APPROVED' if count == len(result) else 'DENIED')

N = int(input())
A = list(map(int, input().split()))
lst = []
count = 0
for ele in A:
    if ele % 2 == 0:
        lst.append(ele)
for ele in lst:
    if ele % 3 == 0 or ele % 5 == 0:
        count += 1
print("APPROVED" if count == len(lst) else "DENIED")

Verdicts: Wrong Answer

Accepted
Problem: We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it.  Print all strings that are written on the most number of votes, in lexicographical order.

Submission attempts (in order):
#from math import sqrt
#from heapq import heappush, heappop
#from collections import deque

n = int(input())

l = []
for _ in range(n):
    s = input()
    l.append(s)

l.sort()

max_count = 0
count = 0
results = []
ps = None
for s in l:
    if s == ps or ps is None:
        count += 1
    else:
        if max_count < count:
            max_count = count
            results = [ps]
        elif count == max_count:
            results.append(ps)
        count = 1
    ps = s

if max_count < count:
    max_count = count
    results = [ps]
elif count == max_count:
    results.append(ps)

results.sort()
print("--")
for str in results:
    print(str)


#from math import sqrt
#from heapq import heappush, heappop
#from collections import deque

n = int(input())

l = []
for _ in range(n):
    s = input()
    l.append(s)

l.sort()

max_count = 0
count = 0
results = []
ps = None
for s in l:
    if s == ps or ps is None:
        count += 1
    else:
        if max_count < count:
            max_count = count
            results = [ps]
        elif count == max_count:
            results.append(ps)
        count = 1
    ps = s

if max_count < count:
    max_count = count
    results = [ps]
elif count == max_count:
    results.append(ps)

results.sort()
for str in results:
    print(str)


Verdicts: Wrong Answer

Accepted
Problem: We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it.  Print all strings that are written on the most number of votes, in lexicographical order.

Submission attempts (in order):
from collections import Counter

input_line=int(input())
count=0
input_list=[]
while count < input_line:
  input_list.append(input())
  count+=1
ans_list=[]
list_set=set(input_list)
max_appeard=Counter(input_list).most_common(1)[0][1]
print (max_appeard)
for item in list_set:
    appeard=Counter(input_list)[item]
    if appeard >= max_appeard:
        max_appeard=appeard
        ans_list.append(item)
ans_list.sort()
for item in ans_list:
  print (item)

from collections import Counter

input_line=int(input())
count=0
input_list=[]
while count < input_line:
  input_list.append(input())
  count+=1
ans={}
ans_list=[]
list_set=set(input_list)
max_appeard=Counter(input_list).most_common(1)[0][1]
print (max_appeard)
for item in list_set:
    appeard=Counter(input_list)[item]
    if appeard >= max_appeard:
        max_appeard=appeard
        ans[item]=appeard
for key,value in ans.items():
    if value==max_appeard:
        ans_list.append(key)
ans_list.sort()
for item in ans_list:
  print (item)

from collections import defaultdict

H=int(input())
d = defaultdict(int)
for _ in range(H):
    d[input()] += 1
max_appeard=max(d.items(), key=lambda x: x[1])[1]
ans=[k for k,v in d.items() if v == max_appeard]
ans.sort()
for item in ans:
  print (item)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it.  Print all strings that are written on the most number of votes, in lexicographical order.

Submission attempts (in order):
from collections import Counter
n = int(input())
s = [input() for i in range(n)]

a = Counter(s)
print(type(a))
b = a.most_common()[0][1]

s = list(set(s)) 


for i in s:
    if s[i] == b:
        print(i)


from collections import Counter
n = int(input())
s = [input() for i in range(n)]

a = Counter(s)
b = a.most_common()[0][1]

s = list(set(s)) 

print(a[])

for i in s:
    if a[i] == b:
        print(i)

from collections import Counter
n = int(input())
s = [input() for i in range(n)]

a = Counter(s)
b = a.most_common()[0][1]

s = list(set(s)) 


for i in s:
    if a[i] == b:
        print(i)

from collections import Counter
n = int(input())
s = [input() for i in range(n)]

a = Counter(s)

b = a.most_common()[0][1]

s = list(set(s)) 
s.sort()

for i in s:
    if a[i] == b:
        print(i)


Verdicts: Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it.  Print all strings that are written on the most number of votes, in lexicographical order.

Submission attempts (in order):
mport collections

N = int(input())
S = []

for i in range(N):
    S.append(input())

S.sort()
counter = collections.Counter(S)

tmp = counter.most_common()

if (len(tmp) == 1):
    print(tmp[0][0])
else:
    for i in range(len(tmp)-1):
        print(tmp[i][0])
        if (tmp[i][1] != tmp[i + 1][1]):
            break

import collections

N = int(input())
S = list(input() for i in range(N))
S.sort()

common = collections.Counter(S).most_common()
N_common = common[0][1]

candidates = [cand for cand in common if cand[1] == N_common]

for i in sorted(candidates):
    print(i[0])

Verdicts: Runtime Error

Accepted
Problem: We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it.  Print all strings that are written on the most number of votes, in lexicographical order.

Submission attempts (in order):
n=int(input())
s=[]
ha={}

for i in range (n):
    s.append(input())
    if (s[i] not in ha.keys()):
        ha[s[i]]=1
    else:
        ha[s[i]]=ha[s[i]]+1

ans=sorted(ha.items(),key=lambda x:x[i], reverse=True)

k=ans[0][1]
i=0
while (i< len(ans) and ans[i][1]==k):
    i+=1

ans=ans[:i]
ans.sort()
for ss in ans:
    print(ss[0])


N=input()
n=int(N)

p=[]
for i in range(n):
    p.append(input())

q=list(set(p))

maxi=0
big=[]

for i in range(len(q)):
    if maxi<p.count(q[i]):
        maxi=p.count(q[i])
        big.append(q[i])
        big.pop(0)
    if maxi==p.count(q[i]):
        big.append(q[i])
    else:
        continue

for i in range(len(big)):
    print(big[i])

k=int(input())
d=dict()
for i in range(k):
    x=input()
    d[x]=d.get(x,0)+1
q=list()
for k,v in d.items():
    q.append( (v,k) )
bigV=0
for (v,k) in sorted(q,reverse=True):
    if(v>bigV):
        bigV=v
for (v,k) in sorted(q):
    if(v==bigV):
        print(k)


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it.  Print all strings that are written on the most number of votes, in lexicographical order.

Submission attempts (in order):
n = int(input())
s = []
while True:
    try:
        s.append(input())
    except EOFError:
        break

word_counter = {}
for word in s:
    if word in word_counter:
        word_counter[word] += 1
    else:
        word_counter[word] = 0

results = sorted(word_counter.items(), key=lambda x: x[1], reverse=True)
max_v = results[0][1]

for r in results:
    if r[1] == max_v:
        print(r[0].strip('\n'))
    else:
        break
 

n = int(input())
s = []
while True:
    try:
        s.append(input())
    except EOFError:
        break

word_counter = {}
for word in s:
    if word in word_counter:
        word_counter[word] += 1
    else:
        word_counter[word] = 0

results = sorted(word_counter.items(), key=lambda x: x[1], reverse=True)
max_v = results[0][1]

pick_ups = [result[0] for result in results if result[1] == max_v]
sorted_pick_ups = sorted(pick_ups)
print(*sorted_pick_ups, sep='\n')

Verdicts: Wrong Answer

Accepted
Problem: We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it.  Print all strings that are written on the most number of votes, in lexicographical order.

Submission attempts (in order):
from itertools import groupby
from iterator import itemgetter

a = groupby(sorted(input() for _ in range(int(input()))))
a = [(len(tuple(g)), s) for s, g in a]
m = max(a, key=itemgetter(0))[0]
for k, s in a:
  if k == m:
    print(s)


from itertools import groupby
from itertools import itemgetter

a = groupby(sorted(input() for _ in range(int(input()))))
a = [(len(tuple(g)), s) for s, g in a]
m = max(a, key=itemgetter(0))[0]
for k, s in a:
  if k == m:
    print(s)


from collections import Counter

c = Counter(input() for _ in range(int(input())))
m = max(c.values())
for s in sorted(s for s, k in c.items() if k == m) 
  print(s)


from collections import Counter
 
c = Counter(input() for _ in range(int(input())))
m = max(c.values())
for s in sorted(s for s, k in c.items() if k == m): 
  print(s)
 

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it.  Print all strings that are written on the most number of votes, in lexicographical order.

Submission attempts (in order):
# -*- coding: utf-8 -*-
N = int(input())
s = []
c = []
d = []
for i in range(N):
    S = input()
    s.append(S)
for i in range(N):
    c.append(s.count(s[i]))
for i in range(N):
    if max(c) == c[i]:
        d.append(s[i])
d = set(d)
for i in range(len(d)):
    print(list(d)[i])

# -*- coding: utf-8 -*-
from collections import Counter
N = int(input())
S = []
for i in range(N):
    s = input()
    S.append(s)
S = Counter(S).most_common()
a = []
b = []
for i in S:
    a.append(i[0])
    b.append(i[1])
c = []
for i in range(b.count(max(b))):
    c.append(a[i])
c.sort()
print(*c, sep="\n")

Verdicts: Wrong Answer

Accepted
Problem: We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it.  Print all strings that are written on the most number of votes, in lexicographical order.

Submission attempts (in order):
n=int(input())
A=[]
for i in range(n):
  A.append(input())
from collections import Counter
C=Counter(A)
qq=max(C.values())
ans=[]
for word,times in C.items():
  if times==qq:
    ans.append(word)
print(sorted(ans))

n=int(input())
A=[]
for i in range(n):
  A.append(input())
from collections import Counter
C=Counter(A)
qq=max(C.values())
ans=[]
for word,times in C.items():
  if times==qq:
    ans.append(word)
ans.sort()
for i in range(len(ans)):
  print(ans[i])


Verdicts: Wrong Answer

Accepted
Problem: We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it.  Print all strings that are written on the most number of votes, in lexicographical order.

Submission attempts (in order):
n=int(input())
s_list=[input() for _ in range(n)]

import collections
s_counter = collections.Counter(s_list)

import sys
max_count = s_counter.most_common()[0][1]

s_list_keys = list(s_counter.keys())
s_list_values = list(s_counter.values())

list_ans = []

for i in range(len(s_list_keys)):
    if s_list_values[i] == max_count:
        list_ans.append(s_list_keys[i])
    else:
        sys.exit()

list_ans.sort()

for i in range(len(list_ans)):
    print(list_ans[i])

n=int(input())
s_list=[input() for _ in range(n)]

import collections
s_counter = collections.Counter(s_list)

import sys
max_count = s_counter.most_common()[0][1]

s_list_keys = list(s_counter.keys())
s_list_values = list(s_counter.values())

for i in range(len(s_list_keys)):
    if s_list_values[i] == max_count:
        print(s_list_keys[i])
    else:
        sys.exit()

n=int(input())
s_list=[input() for _ in range(n)]

import collections
s_counter = collections.Counter(s_list)

import sys
max_count = s_counter.most_common()[0][1]

s_list_keys = list(s_counter.keys())
s_list_values = list(s_counter.values())

list_ans = []

for i in range(len(s_list_keys)):
    if s_list_values[i] == max_count:
        list_ans.append(s_list_keys[i])

list_ans.sort()

for i in range(len(list_ans)):
    print(list_ans[i])

Verdicts: Wrong Answer

Wrong Answer

Accepted