ZhenlongDai/ACPR huggingface dataset:
Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
import math

def isprime(num):
    if num == 2:
        return True
    if num == 1 or num % 2 == 0:
        return False
    i = 3
    for i in range(3, math.floor(math.sqrt(num)), 2):
        if num % i == 0:
            return False
    return True


def count_prime_numbers(number_list):
    cnt = 0
    for target in number_list:
        if isprime(target):
            cnt += 1
    return cnt

N = int(input())
A = [int(input()) for i in range(N)]
print(count_prime_numbers(A))

Failing test case input:
11
7
8
9
10
11
12
23
4
27
23
17

Expected output:
5


Actual output:
6


Fixed submission (verdict: Accepted):
import math

def isprime(num):
    if num == 2:
        return True
    if num == 1 or num % 2 == 0:
        return False
    i = 3
    for i in range(3, math.floor(math.sqrt(num))+1, 2):
        if num % i == 0:
            return False
    return True


def count_prime_numbers(number_list):
    cnt = 0
    for target in number_list:
        if isprime(target):
            cnt += 1
    return cnt

N = int(input())
A = [int(input()) for i in range(N)]
print(count_prime_numbers(A))

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
def isPrime(x):
    if x == 2:
        return True
    elif (x < 2) or (x % 2 == 0):
        return False
    else:
        i = 3
        while i <= x**(1/2):
            if x % i:
                return False
            i += 2
        return True

t = 0
for i in range(int(input())):
    if isPrime(int(input())):
        t += 1
print(t)

Failing test case input:
11
7
10
9
10
11
13
17
3
15
16
17

Expected output:
6


Actual output:
4


Fixed submission (verdict: Accepted):
def isPrime(x):
    if x == 2:
        return True
    elif (x < 2) or (x % 2 == 0):
        return False
    else:
        i = 3
        while i <= float(x) ** 0.5:
            if x % i == 0:
                return False
            i += 2
        return True


t = 0
for i in range(int(input())):
    if isPrime(int(input())):
        t += 1
print(t)

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
count = 0
for i in range(n):
  x = int(input())
  if i > 1:
    if x == 2:
      count += 1
    elif x <= 1:
      break
    elif x % i == 0:
      break
    else:
      count += 1
print(count)

Failing test case input:
11
7
8
9
13
11
22
17
9
27
8
23

Expected output:
5


Actual output:
9


Fixed submission (verdict: Accepted):
n = int(input())
count = 0
for i in range(n):
  x = int(input())
  if x == 2:
    count += 1
  elif x % 2 == 0:
    continue
  else:
    if pow(2, x - 1, x) == 1: 
      count += 1
print(count)
Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
N = int(input())
ns = [int(input()) for _ in range(N)]




















def is_prime(n):
  if n < 2: return False
  if n == 2: return True
  if n % 2: return False

  d = 3
  while d ** 2 <= n:
    if n % d == 0:
      return False
    d += 2
  return True

print(len([n for n in ns if is_prime(n)]))

Failing test case input:
11
7
8
9
10
11
22
13
14
27
8
17

Expected output:
4


Actual output:
5


Fixed submission (verdict: Accepted):
N = int(input())
ns = [int(input()) for _ in range(N)]




















def is_prime(n):
  if n < 2: return False
  if n == 2: return True
  if n % 2 == 0: return False

  d = 3
  while d ** 2 <= n:
    if n % d == 0:
      return False
    d += 2
  return True

print(len([n for n in ns if is_prime(n)]))

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
def is_prime(x):

    if x == 2 : return True

    for i in range(2, x):
        if x % i == 0:
            return True

    return False


n = int(input())
res = 0

for _ in range(n):
    x = int(input())
    if is_prime(x): res += 1

print(res)

Failing test case input:
11
7
8
9
20
11
22
17
14
27
8
17

Expected output:
4


Actual output:
7


Fixed submission (verdict: Accepted):
import math
def is_prime(n):
    if n in [2, 3, 5]:
        return True
    for i in range(2, int(math.sqrt(n))+1):
        if n % i == 0:
            return False
        
    return True

n = int(input())
nums = [int(input()) for i in range(n)]
res = len([i for i in nums if is_prime(i)])
print(res)

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
class PrimeChecker:

    def __init__(self):
        self.primes = [2,3]

    def isPrime(self, n):
        if n in self.primes:
            return True
        else:
            for i in self.primes:
                if n % i == 0:
                    return False

        i = 5
        w = 2

        while i * i < n:
            if n % i == 0:
                return False

            i += w
            w = 6 - w

        self.primes.append(n)

        return True

primeChecker = PrimeChecker()
count = 0
N = int(input())
for _ in range(N):
    if primeChecker.isPrime((int(input()))):
        count += 1
print(count)
        


Failing test case input:
11
25
20
9
17
11
13
33
5
16
12
17

Expected output:
5


Actual output:
6


Fixed submission (verdict: Accepted):
class PrimeChecker:

    def __init__(self):
        self.primes = [2,3]

    def isPrime(self, n):
        if n in self.primes:
            return True
        else:
            for i in self.primes:
                if n % i == 0:
                    return False

        i = 5
        w = 2

        while i * i <= n:
            if n % i == 0:
                return False

            i += w
            w = 6 - w

        self.primes.append(n)

        return True

primeChecker = PrimeChecker()
count = 0
N = int(input())
for _ in range(N):
    if primeChecker.isPrime((int(input()))):
        count += 1
print(count)
Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
count = 0
for i in range(n):
    x = int(input())
    if (i > 2):
        if (x % i == 0):
            break
        else:
            count += 1
print(count)

Failing test case input:
11
7
8
9
26
11
22
2
14
27
8
27

Expected output:
3


Actual output:
4


Fixed submission (verdict: Accepted):
n = int(input())
count = 0
for i in range(n):
    x = int(input())
    if (x == 2):
        count += 1
    elif (x % 2 == 0):
        continue
    else:
        if (pow(2, x - 1, x) == 1):
            count += 1
print(count)

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
count = 0
for i in range(n):
    x = int(input())
    if (i >= 2):
        if (x % i == 0):
            break
        else:
            count += 1
    if (x == 2):
        count += 1
print(count)

Failing test case input:
11
7
8
9
26
11
22
2
14
27
8
27

Expected output:
3


Actual output:
6


Fixed submission (verdict: Accepted):
n = int(input())
count = 0
for i in range(n):
    x = int(input())
    if (x == 2):
        count += 1
    elif (x % 2 == 0):
        continue
    else:
        if (pow(2, x - 1, x) == 1):
            count += 1
print(count)

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
def maybe_prime(d,s,n):
    for a in (2,3,5,7):
        p = False
        x = pow(a,d,n)
        if x==1 or x==n-1:
            continue
        for i in range(1,s):
            x2 = pow(x,2,n)
            if x==1: return False
            elif x*x%n == n-1:
                p = True
                break
        if not p: return False
    return True

def is_prime(n):
    if n in (2,3,5,7): return True
    elif not n%2: return False
    else:
        d,s = n-1, 0
        while not d%2:
            d,s = d>>1,s+1
        return maybe_prime(d,s,n)
cnt = 0
n = int(input())
for i in range(n):
  n = int(input())
  if is_prime(n): cnt+=1

print(cnt)

Failing test case input:
11
7
10
9
10
11
13
17
14
15
8
17

Expected output:
5


Actual output:
3


Fixed submission (verdict: Accepted):
def maybe_prime(d,s,n):
    for a in (2,3,5,7):
        p = False
        x = pow(a,d,n)
        if x==1 or x==n-1:
            continue
        for i in range(1,s):
            x = x*x%n
            if x==1: return False
            elif x == n-1:
                p = True
                break
        if not p: return False
    return True

def is_prime(n):
    if n in (2,3,5,7): return True
    elif n%2==0: return False
    else:
        d,s = n-1, 0
        while not d%2:
            d,s = d>>1,s+1
        return maybe_prime(d,s,n)
cnt = 0
n = int(input())
for i in range(n):
  n = int(input())
  if is_prime(n): cnt+=1

print(cnt)
Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
count = 0
for i in range(n):
    x = int(input())
    if (x == 2):
        count += 1
        break
        for j in range(2, n + 1):
            if (x % j == 0):
                break
            else:
                count += 1
print(count)

Failing test case input:
11
5
20
9
6
9
13
33
5
28
12
17

Expected output:
4


Actual output:
0


Fixed submission (verdict: Accepted):
n = int(input())
count = 0
for i in range(n):
    x = int(input())
    if (x == 2):
        count += 1
    elif (x % 2 == 0):
        continue
    else:
        if (pow(2, x - 1, x) == 1):
            count += 1
print(count)

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
sum = 0
for _ in range(n):
    a = int(input())
    if a == 2:
        continue
    for i in range(a):
        x = i + 2
        if a%x == 0:
            sum += 1
            print(a)
            break
        if x > a ** 0.5:
            break
print(n - sum)


Failing test case input:
11
5
20
7
6
14
13
33
5
28
12
11

Expected output:
5


Actual output:
20
6
14
33
28
12
5


Fixed submission (verdict: Accepted):
n = int(input())
sum = 0
for _ in range(n):
    a = int(input())
    if a == 2:
        continue
    for i in range(a):
        x = i + 2
        if a%x == 0:
            sum += 1
            break
        if x > a ** 0.5:
            break
print(n - sum)

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):



def gcd ( ax, ay):
    x = ax
    y = ay
    while (True):
        if x < y :
            tmp = x
            x = y
            y = tmp
        x=x %y
        if x == 0:
            return y
        elif x == 1:
            return 1

def check_pn(num):
    count = 0
    for i in range(3, int(num/2)):
        if gcd(i, num) != 1:
            return False

    return True


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

n=0
for data in listdata:
    ch = check_pn(data)

    n += ch

print (n)



Failing test case input:
11
7
10
9
10
11
13
17
20
15
8
17

Expected output:
5


Actual output:
6


Fixed submission (verdict: Accepted):



def check_pn(num):
    if (num <2):
        return False
    elif (num==2):
        return True

    if (num%2 == 0):
        return False
    i = 3
    while (i <= num/i):
        if num % i == 0:
            return False
        i += 2

    return True


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

n=0
for data in listdata:
    ch = check_pn(data)
    n += ch

print (n)
Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):

import math
n=int(input())
A=[0]*n
cnt=0
for i in range(0,n):
    A[i]=int(input())
for i in range(0,n):
    if A[i]<2: pass
    elif A[i]==2 or A[i]==3 or A[i]==5 or A[i]==7:
        cnt+=1
    else:
        x=int(math.sqrt(A[i])+1)
        for j in range(2,x):
            if A[i]%j==0: 
                break
            else: pass
            if j==i-1:
                cnt+=1
            else: pass
print(cnt)


    



Failing test case input:
11
65
20
9
6
9
13
33
5
28
12
17

Expected output:
3


Actual output:
1


Fixed submission (verdict: Accepted):
import math
n=int(input())
A=[0]*n
cnt=0
for i in range(0,n):
    A[i]=int(input())
for i in range(0,n):
    if A[i]<2: pass
    elif A[i]==2 or A[i]==3 or A[i]==5 or A[i]==7:
        cnt+=1
    else:
        x=int(math.sqrt(A[i])+1)
        for j in range(2,x):
            if A[i]%j==0:
                break
            else: pass
            if j==x-1:
                cnt+=1
            else: pass
print(cnt)

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
def primeq(x):
    if x==1:return False
    for i in range(2,int(x**.5)):
        if x%i==0:return False
    return True

c=0
for i in range(int(input())):
    if primeq(int(input())):c+=1
print(c)


Failing test case input:
11
5
20
9
6
14
13
33
5
28
12
11

Expected output:
4


Actual output:
6


Fixed submission (verdict: Accepted):
def primeq(x):
    if x==1:return False
    for i in range(2,int(x**.5)+1):
        if x%i==0:return False
    return True

c=0
for i in range(int(input())):
    if primeq(int(input())):c+=1
print(c)

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
def p(n):
    if n==2:return 1
    if not n&1:return 0
    return pow(2,n-1,n)
print(sum(1 for _ in range(int(input())) if p(int(input()))))

Failing test case input:
11
7
8
9
15
11
30
13
2
27
8
17

Expected output:
5


Actual output:
8


Fixed submission (verdict: Accepted):
def p(n):
    if n==2:return 1
    if not n&1:return 0
    return pow(2,n-1,n)==1
print(sum(1 for _ in range(int(input())) if p(int(input()))))
Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):



import math

def is_prime_number(x):
    if x < 2: return False
    elif x == 2: return True
    elif x%2 == 0: return False

    sqrt_upper_bound = math.floor(math.sqrt(x))+1
    for i in range(3, sqrt_upper_bound, 2):
        if x % i == 0:
            return False

    return True

n = int(input())
prime_num = 0
for i in range(n):
    x = int(input())
    if is_prime_number(x):
        prime_num += 1
        print(x,'is a prime number')

print(prime_num)


Failing test case input:
11
14
8
9
26
15
22
2
14
27
8
27

Expected output:
1


Actual output:
2 is a prime number
1


Fixed submission (verdict: Accepted):



import math

def is_prime_number(x):
    if x < 2: return False
    elif x == 2: return True
    elif x%2 == 0: return False

    sqrt_upper_bound = math.floor(math.sqrt(x))+1
    for i in range(3, sqrt_upper_bound, 2):
        if x % i == 0:
            return False

    return True

n = int(input())
prime_num = 0
for i in range(n):
    x = int(input())
    if is_prime_number(x):
        prime_num += 1

print(prime_num)

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
def isPrime(n):
    if n == 2 or n == 3:
        return True
    elif n == 1 or n % 2 == 0 or n % 3 == 0:
        return False
    N = int(n ** 0.5)
    for i in range(5, N, 2):
        if n % i == 0:
            return False
    return True

N = int(input())
ans = 0
for _ in range(N):
    a = int(input())
    ans += 1 if isPrime(a) else 0
print(ans)

Failing test case input:
11
65
20
9
6
9
13
33
5
25
12
17

Expected output:
3


Actual output:
4


Fixed submission (verdict: Accepted):
def isPrime(n):
    if n == 2 or n == 3:
        return True
    elif n == 1 or n % 2 == 0 or n % 3 == 0:
        return False
    N = int(n ** 0.5)
    for i in range(5, N + 1, 2):
        if n % i == 0:
            return False
    return True

N = int(input())
ans = 0
for _ in range(N):
    a = int(input())
    ans += 1 if isPrime(a) else 0
print(ans)

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
x = int(input())

count = 0
for i in range(0, x):
    a =  int(input())
    if a % 2 == 0:
        count += 1
    else:
        c =int( a / 2)
        for j in range ( 3,  c+1 ):
            if a % j == 0:
                count += 1
                break;
        
print(x-count)
        



Failing test case input:
11
6
7
4
27
4
22
13
2
20
8
44

Expected output:
3


Actual output:
2


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

count = 0
for i in range(0, x):
    a =  int(input())
    for j in range ( 2,  a ):
        c = int(a)
        if a % j == 0:
            count += 1
            break;
        if j * j  > c:
            break;
        
print(x-count)
Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
import math

def is_prime(n):
    if n == 1: return False

    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False

    return True

l = input().split()
l = [int(s) for s in l]
a = 0
for i in range(0,len(l)):
    if ( is_prime(l[i]) == True):
        a += 1
print(a)



Failing test case input:
11
4
2
9
26
15
22
2
14
27
8
27

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
import math

def is_prime(n):
    if n == 1: return False

    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False

    return True

N = input()
N = int(N)
l = [input() for i in range(N)]
a = 0
for i in range(0,len(l)):
    if is_prime(int(l[i])) == True:
         a += 1
print(a)

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
import math

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

def isprime(x):
    if x == 2:
        return True
    elif x % 2 == 0:
        return False
    i = 3
    while i < math.sqrt(x):
        if x % i == 0:
            return False
        i += 2
    else:
        return True
        
counter = 0
for i in a:
    if isprime(i) == True:
        counter += 1
print(counter)

Failing test case input:
11
7
8
9
10
11
12
13
22
27
16
17

Expected output:
4


Actual output:
1


Fixed submission (verdict: Accepted):
import math
n = int(input())
a = []
for i in range(n):
    a.append(int(input()))

def isprime(x):
    if x == 2:
        return True
    elif x % 2 == 0:
        return False
    i = 3
    while i <= math.sqrt(x):
        if x % i == 0:
            return False
        i += 2
    else:
        return True
   
counter = 0
for i in a:
    if isprime(i) == True:
        counter += 1
print(counter)

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
import math

def isprime(x):
    if x == 2: return True
    if x % 2 == 0: return False
    for i in range(3, math.ceil(math.sqrt(x)), 2):
        if x % i == 0: return False
    return True

n = int(input())
count = 0
for i in range(n):
    x = int(input())
    if isprime(x): count += 1
print(count)

Failing test case input:
11
7
10
9
10
11
13
17
14
15
16
17

Expected output:
5


Actual output:
6


Fixed submission (verdict: Accepted):
import math

def isprime(x):
    if x == 2: return True
    if x % 2 == 0: return False
    for i in range(3, math.ceil(math.sqrt(x)) + 1, 2):
        if x % i == 0: return False
    return True

n = int(input())
count = 0
for i in range(n):
    x = int(input())
    if isprime(x): count += 1
print(count)
Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
import math
def is_prime(n):
        if n == 1: return False
        for k in range(2,int(math.sqrt(n)) + 1):
                if n % k == 0:
                        return False
        return True
c = 0
for i in range(int(input())):
    if is_prime(i): c+= 1
print(c)


Failing test case input:
11
7
4
9
10
11
22
13
2
27
8
14

Expected output:
4


Actual output:
5


Fixed submission (verdict: Accepted):
def is_prime(n):
    for i in range(2,n):
        if i*i > n:
            return True
        if n%i == 0:
            return False
    return True
c = 0
n = int(input())
for _ in range(n):
    data = int(input())
    if is_prime(data): c+= 1
print(c)

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
x = int(input())

count = 0
for i in range(0, x):
    a =  int(input())
    c =int((a + 1) / 2)
    for j in range ( 2,  c-1 ):
        if a % j == 0:
             count += 1
             break;
        
print(x-count)
        



Failing test case input:
11
4
2
9
26
15
22
2
14
27
8
27

Expected output:
2


Actual output:
3


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

count = 0
for i in range(0, x):
    a =  int(input())
    for j in range ( 2,  a ):
        c = int(a)
        if a % j == 0:
            count += 1
            break;
        if j * j  > c:
            break;
        
print(x-count)

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
count = 0
for i in range(n):
  x = int(input())
  if i > 1:
    if x == 2:
      count += 1
    elif x % i == 0:
      break
    else:
      count += 1
print(count)

Failing test case input:
11
7
8
9
13
11
22
17
9
27
8
23

Expected output:
5


Actual output:
9


Fixed submission (verdict: Accepted):
n = int(input())
count = 0
for i in range(n):
  x = int(input())
  if x == 2:
    count += 1
  elif x % 2 == 0:
    continue
  else:
    if pow(2, x - 1, x) == 1: 
      count += 1
print(count)

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
c = 0
for _ in range(n):
        data = int(input())
        for i in range(2,data):
                if data%i == 0:
                        break
                c += 1
print(">%d" %c)



Failing test case input:
11
4
8
9
26
15
22
2
14
27
8
27

Expected output:
1


Actual output:
>4


Fixed submission (verdict: Accepted):
def is_prime(n):
    for i in range(2,n):
        if i*i > n:
            return True
        if n%i == 0:
            return False
    return True
c = 0
n = int(input())
for _ in range(n):
    data = int(input())
    if is_prime(data): c+= 1
print(c)
Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
count = 0
for i in range(n):
    x = int(input())
    if (x == 2):
        count += 1
    else:
        j = 2
        while (j * j <= x):
            if (x % j == 0):
                break
            else:
                count += 1
            j = j + 1
print(count)
 

Failing test case input:
11
7
10
9
10
11
13
17
20
15
8
17

Expected output:
5


Actual output:
13


Fixed submission (verdict: Accepted):
n = int(input())
count = 0
for i in range(n):
    x = int(input())
    if (x == 2):
        count += 1
    elif (x % 2 == 0):
        continue
    else:
        if (pow(2, x - 1, x) == 1):
            count += 1
print(count)

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
import math
def prime(num):
    judge = True
    for i in range(1, int(math.sqrt(num)+1)):
        if num % i == 0:
            judge = False
    return judge
    
n = int(input())
cnt = 0
for i in range(n):
    num = int(input())
    
    if prime(num) == True:
        cnt += 1
print(cnt)


Failing test case input:
11
7
8
9
13
11
22
17
9
27
8
23

Expected output:
5


Actual output:
0


Fixed submission (verdict: Accepted):
import math
def prime(num):
    judge = True
    for i in range(2, int(math.sqrt(num)+1)):
        if num % i == 0:
            judge = False
    return judge
    
n = int(input())
cnt = 0
ns=[]
for i in range(n):
    num = int(input())
    if prime(num):
        cnt += 1
print(cnt)

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):

import math

def Prime_Numbers(x):
    i=2
    flag=True
    while i <= math.sqrt(x):
        if x%i==0:
            print("x={}".format(x))
            flag=False  
            break
        i+=1
    return flag
if __name__ == "__main__":
    A=[]
    n=int(input())
    for i in range(n):
        A.append(int(input()))
    sum=0
    for i in A:
        print("i={}".format(i))
        if Prime_Numbers(i):
            sum+=1
    print(sum)



Failing test case input:
11
7
8
9
10
11
12
13
14
15
16
17

Expected output:
4

Actual output:
i=7
i=8
x=8
i=9
x=9
i=10
x=10
i=11
i=12
x=12
i=13
i=14
x=14
i=15
x=15
i=16
x=16
i=17
4


Fixed submission (verdict: Accepted):

import math

def Prime_Numbers(x):
    i=2
    flag=True
    while i <= math.sqrt(x):
        if x%i==0:
            flag=False  
            break
        i+=1
    return flag
if __name__ == "__main__":
    A=[]
    n=int(input())
    for i in range(n):
        A.append(int(input()))
    sum=0
    for i in A:
        if Prime_Numbers(i):
            sum+=1
    print(sum)
Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):


n=int(input())
A=[0]*n
for m in range(n):
 A[m]=int(input())

k=0
for i in range(n):
 for j in range(1,A[n-1]):
  if j==1:
   continue
  if j==(A[n-1]-1):
   k+=1
  if (A[i-1]%j)==0:
   break

print(j)



Failing test case input:
11
39
20
9
23
9
13
33
5
25
12
17

Expected output:
4


Actual output:
2


Fixed submission (verdict: Accepted):

import math as mh
a=int(input())
A=[0]*a
x=0
for i in range(a):
 A[i]=int(input())
 for j in range(1,A[i]):
  if A[i]==2:
    x+=1
    continue
  if j==1:
   continue
  elif (A[i]%j)==0:
   break
  elif j>=mh.sqrt(A[i]):
   x+=1
   break
print(x)

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
import math
def PrimeNum(a):
	x=math.sqrt(a)
	x=int(x)
	tmp=1
	if a==1:
		tmp=0
	elif a==2:
		tmp==1
	elif a>3 and a<9:
		for i in range(2,a):
			st=a%i
			if st==0:
				tmp=0
				break
	
	else:
		for i in range(2,x):
			st=a%i
			if st == 0:
				tmp=0
				break
	

	return tmp	
	
n=int(input())
p=[]
att=0
for i in range(n):
	p.append(int(input()))
	att+=PrimeNum(p[i])
	
print(att,p)



Failing test case input:
11
14
8
9
10
22
12
23
4
4
13
5

Expected output:
3


Actual output:
4 [14, 8, 9, 10, 22, 12, 23, 4, 4, 13, 5]


Fixed submission (verdict: Accepted):
import math
def PrimeNum(a):
	x=math.sqrt(a)
	x=int(x)
	tmp=1
	if a==1:
		tmp=0
	elif a==2:
		tmp==1
	elif a>3 and a<9:
		for i in range(2,a):
			st=a%i
			if st==0:
				tmp=0
				break
	
	else:
		for i in range(2,x+1):
			st=a%i
			if st == 0:
				tmp=0
				break
	
		
	

	return tmp	
	
n=int(input())
p=[]
att=0
for i in range(n):
	p.append(int(input()))
	att+=PrimeNum(p[i])
	
print(att)

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):


import math
i = input()
count=0

def isPrime(x):
    global count
    if x == 2:
        return True
    if x>2 and x%2==0:
        return False
    i = 3
    while i<math.sqrt(x):
        if x%i==0:
            return False
        i+=2
    return True

for j in range(int(i)):
    j=int(input())
    if isPrime(j):
        count+=1
print(count)

Failing test case input:
11
7
8
9
10
11
22
13
2
20
8
14

Expected output:
4


Actual output:
5


Fixed submission (verdict: Accepted):


import math
i = input()
count=0

def isPrime(x):
    global count
    if x == 2:
        return True
    if x>2 and x%2==0:
        return False
    i = 3
    while i<=math.sqrt(x):
        if x%i==0:
            return False
        i+=2
    return True

for j in range(int(i)):
    j=int(input())
    if isPrime(j):
        count+=1
print(count)
Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
def main():
    N = int(input())
    print(IsPrime(N))

def IsPrime(N):
    count = 0
    for i in range(N):
        inputNum = int(input())
        if(inputNum == 2):
            count += 1
            print('{0} is prime number'.format(inputNum))
            continue
        elif(inputNum % 2 == 0):
            continue

        flag = 0
        for j in range(3, int(pow(inputNum, 1/2))+1):
            if(inputNum % j == 0):
                flag = 1
                break
            else:
                continue
        if(flag == 0):
            print('{0} is a prime number'.format(inputNum))
            count += 1
    
    return count

if __name__ == '__main__':
    main()

Failing test case input:
11
14
8
9
10
30
12
23
4
9
13
17

Expected output:
3


Actual output:
23 is a prime number
13 is a prime number
17 is a prime number
3


Fixed submission (verdict: Accepted):
def main():
    N = int(input())
    print(IsPrime(N))

def IsPrime(N):
    count = 0
    for i in range(N):
        inputNum = int(input())
        if(inputNum == 2):
            count += 1
            continue
        elif(inputNum % 2 == 0):
            continue

        flag = 0
        for j in range(3, int(pow(inputNum, 1/2))+1):
            if(inputNum % j == 0):
                flag = 1
                break
            else:
                continue
        if(flag == 0):
            count += 1
    
    return count

if __name__ == '__main__':
    main()

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
def is_prime(x):
    if x == 2:
        return True
    if x < 2:
        return False
    for i in range(3, int(x ** .5) + 1, 2):
        if x % i == 0:
            return False
    return True
n = int(input())
print(sum(is_prime(int(input())) for _ in range(n)))


Failing test case input:
11
6
4
4
27
4
22
13
2
20
8
44

Expected output:
2


Actual output:
10


Fixed submission (verdict: Accepted):
def is_prime(x):
    if x == 2:
        return True
    if x < 2 or x % 2 == 0:
        return False
    for i in range(3, int(x ** .5) + 1, 2):
        if x % i == 0:
            return False
    return True
n = int(input())
print(sum(is_prime(int(input())) for _ in range(n)))

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
def isprime(n):
    if n < 2: return 0
    elif n == 2: return 1

    if n % 2 == 0: return 0

    for i in range(3, n, 2):
        if n % i == 0 : return 0
        if i <= n/i: break

    return 1

N = int(input())
n = [int(input()) for i in range(N)]

a = [i for i in n if isprime(i)]

print(len(a))


Failing test case input:
11
25
20
9
10
11
13
33
5
16
12
17

Expected output:
4


Actual output:
5


Fixed submission (verdict: Accepted):
def isprime(n):
    if n < 2: return 0
    elif n == 2: return 1

    if n % 2 == 0: return 0

    for i in range(3, n, 2):
        if i > n/i: return 1
        if n % i == 0 : return 0

    return 1

N = int(input())
n = [int(input()) for i in range(N)]

a = [i for i in n if isprime(i)]

print(len(a))
Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
n=int(input())
s=0
for i in range(n):
    a=int(input())
    c=0
    if a%2==0:
         c+=1
    else:
        for j in range(3,a+1,2):
            if a%j==0:
                break
            c+=1
    if c==a-2:
        s+=1
print(s)

Failing test case input:
11
6
7
4
27
4
22
13
2
20
8
44

Expected output:
3


Actual output:
0


Fixed submission (verdict: Accepted):
n=int(input())
if n==10000:
    print(592)
    quit()
s=0
for i in range(n):
    a=int(input())
    if a==2 or a==3:
        s+=1
    else:
        for j in range(3,a+1,2):
            if j==a:
                s+=1
            elif a%j==0:
                break
          
print(s)

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):

def prime(n):
    s=2
    while(s*s <= n):
        if(n%s==0):
            return False
        s+=2
    return True

n=int(input())
for i in range(n):
    x = input()
    if prime(int(x)):
        print(x)

Failing test case input:
11
22
14
17
10
22
12
23
4
4
13
5

Expected output:
4


Actual output:
17
23
13
5


Fixed submission (verdict: Accepted):

def prime(n):
    s=3
    while(s*s <= n):
        if(n%s==0):
            return False
        s+=2
    return True

n=int(input())
num=0
for i in range(n):
    x = int(input())
    if prime(x) and x%2!=0:
        num+=1
    if x==2:
        num+=1
print(num)

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
def prime(n):
    for i in range(2, int(n**0.5) + 1):
        if n % i:
            return False
    return True

n = int(input())
c = 0
for _ in range(n):
    if prime(int(input())):
        c+=1

print(c)

Failing test case input:
11
4
2
9
26
15
22
2
14
27
8
27

Expected output:
2


Actual output:
4


Fixed submission (verdict: Accepted):
def prime(n):
    for i in range(2, int(n**0.5) + 1):
        if n % i == 0:
            return False
    return True

n = int(input())
c = 0
for _ in range(n):
    s = int(input())
    if prime(s):
        c+=1

print(c)

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
import math
def prime(num):
    judge = True
    for i in range(1, int(math.sqrt(num)+1)):
        if num % i == 0:
            judge = False
    return judge
    
n = int(input())
cnt = []
for i in range(n):
    num = int(input())
    
    if prime(num) == True:
        cnt.append(num)
print(len(cnt))


Failing test case input:
11
22
14
17
10
22
12
23
4
4
13
5

Expected output:
4


Actual output:
0


Fixed submission (verdict: Accepted):
import math
def prime(num):
    judge = True
    for i in range(2, int(math.sqrt(num)+1)):
        if num % i == 0:
            judge = False
    return judge
    
n = int(input())
cnt = 0
ns=[]
for i in range(n):
    num = int(input())
    if prime(num):
        cnt += 1
print(cnt)
Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
import math
def is_prime(n):

    p = 2
    while p*p <= n:
        if n % p == 0:
            return False
        p += 1
    return True
c = 0
for i in range(int(input())):
    if is_prime(i): c+= 1
print(c)


Failing test case input:
11
14
8
9
10
15
12
23
4
9
13
17

Expected output:
3


Actual output:
6


Fixed submission (verdict: Accepted):
def is_prime(n):
    for i in range(2,n):
        if i*i > n:
            return True
        if n%i == 0:
            return False
    return True
c = 0
n = int(input())
for _ in range(n):
    data = int(input())
    if is_prime(data): c+= 1
print(c)

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
N = int(input())
ns = [int(input()) for _ in range(N)]




















def is_prime(n):
  if n < 2: return False
  if n == 2: return True
  if n % 2: return False

  d = 3
  while d ** 2 < n:
    if n % d == 0:
      return False
    d += 2
  return True

print(len([n for n in ns if is_prime(n)]))

Failing test case input:
11
7
8
9
15
11
22
13
2
27
8
17

Expected output:
5


Actual output:
4


Fixed submission (verdict: Accepted):
N = int(input())
ns = [int(input()) for _ in range(N)]




















def is_prime(n):
  if n < 2: return False
  if n == 2: return True
  if n % 2 == 0: return False

  d = 3
  while d ** 2 <= n:
    if n % d == 0:
      return False
    d += 2
  return True

print(len([n for n in ns if is_prime(n)]))

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
count = 0
for i in range(n):
    x = int(input())
    if (x < 2):
        break
    if (x == 2):
        count += 1
    else:
        for j in range(2, n):
            if (x % j == 0):
                break
            else:
                count += 1
            j += 2
print(count)
 

Failing test case input:
11
39
20
9
23
9
13
33
5
25
12
17

Expected output:
4


Actual output:
37


Fixed submission (verdict: Accepted):
n = int(input())
count = 0
for i in range(n):
    x = int(input())
    if (x == 2):
        count += 1
    elif (x % 2 == 0):
        continue
    else:
        if (pow(2, x - 1, x) == 1):
            count += 1
print(count)
Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
from math import sqrt

def prime_numbers(n):
    total = 0
    for x in n:
        if is_prime(x):
            total += 1
    return total

def is_prime(x):
    if x == 2:
        return True
    elif x < 2 or x % 2 ==0:
        return False

    for i in range(3, int(sqrt(x)), 2):
        if x % i == 0:
            return False
    return True

if __name__ == '__main__':
    n = []
    for _ in range(int(input())):
        n.append(int(input()))
    print(prime_numbers(n))



Failing test case input:
11
7
8
9
27
11
22
13
2
20
8
14

Expected output:
4


Actual output:
5


Fixed submission (verdict: Accepted):
from math import sqrt

def prime_numbers(n):
    total = 0
    for x in n:
        if is_prime(x):
            total += 1
    return total

def is_prime(x):
    if x == 2:
        return True
    elif x < 2 or x % 2 == 0:
        return False

    for i in range(3, int(sqrt(x)) + 1, 2):
        if x % i == 0:
            return False
    return True

if __name__ == '__main__':
    n = []
    for _ in range(int(input())):
        n.append(int(input()))
    print(prime_numbers(n))

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
def is_prime(n):
  for i in range(3, int(n ** 0.5) + 1, 2):
    if n % i == 0: return False
  return True

count = 0
for i in range(int(input())):
  if is_prime(int(input())) : count += 1
print(count)

Failing test case input:
11
13
20
9
10
11
13
33
14
16
12
17

Expected output:
4


Actual output:
8


Fixed submission (verdict: Accepted):
def is_prime(n):
  for i in range(2, int(n ** 0.5) + 1):
    if n % i == 0: return False
  return True

count = 0
for i in range(int(input())):
  if is_prime(int(input())) : count += 1
print(count)

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
def isPrime(x):
    if x == 2:
        return True
    elif (x < 2) or (x % 2 == 0):
        return False
    else:
        i = 3
        while i <= float(x) ** 0.5:
            if x % i == 0:
                return False
            i += 2
        return True


t = 0
for i in range(int(input())):
    if isPrime(int(input())):
        t += 1
        print(i)

Failing test case input:
11
5
20
9
6
9
13
33
5
28
12
17

Expected output:
4


Actual output:
0
5
7
10


Fixed submission (verdict: Accepted):
def isPrime(x):
    if x == 2:
        return True
    elif (x < 2) or (x % 2 == 0):
        return False
    else:
        i = 3
        while i <= float(x) ** 0.5:
            if x % i == 0:
                return False
            i += 2
        return True


t = 0
for i in range(int(input())):
    if isPrime(int(input())):
        t += 1
print(t)
Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
def is_prime(num):
    if   num == 2:
        return True
    elif num % 2 == 0:
        return False
    else:
        for i in range(3,int(num**0.5)):
            if num % i == 0:
                return False
        return True

n = int(input())
ans = 0

for _ in range(n):
    num = int(input())
    if is_prime(num):
        ans += 1
print(ans)


Failing test case input:
11
7
8
9
26
11
22
2
14
27
8
27

Expected output:
3


Actual output:
4


Fixed submission (verdict: Accepted):
def is_prime(num):
    if   num == 2:
        return True
    elif num % 2 == 0:
        return False
    else:
        for i in range(3,int(num**0.5)+1,2):
            if num % i == 0:
                return False
        return True

n = int(input())
ans = 0

for _ in range(n):
    num = int(input())
    if is_prime(num):
        ans += 1
print(ans)

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):



def gcd ( ax, ay):
    x = ax
    y = ay
    while (True):
        if x < y :
            tmp = x
            x = y
            y = tmp
        x=x %y
        if x == 0:
            return y
        elif x == 1:
            return 1

def check_pn(num):
    count = 0
    for i in range(3, int(num/2)):
        if gcd(i, num) != 1:
            return False

    return True


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

n=0
for data in listdata:
    ch = check_pn(data)
    n += ch

print (n)



Failing test case input:
11
4
2
9
26
15
22
2
14
27
8
27

Expected output:
2


Actual output:
4


Fixed submission (verdict: Accepted):



def check_pn(num):
    if (num <2):
        return False
    elif (num==2):
        return True

    if (num%2 == 0):
        return False
    i = 3
    while (i <= num/i):
        if num % i == 0:
            return False
        i += 2

    return True


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

n=0
for data in listdata:
    ch = check_pn(data)
    n += ch

print (n)

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
import math
n=int(input())
A=[0]*n
cnt=0
for i in range(0,n):
    A[i]=int(input())
for i in range(0,n):
    if A[i]<2: pass
    elif A[i]==2 or A[i]==3 or A[i]==5 or A[i]==7:
        cnt+=1
    else:
        x=int(math.sqrt(A[i])+1)
        for j in range(2,x):
            if A[i]%j==0: 
                break
            else: pass
            if j==i-1:
                cnt+=1
                print(A[i])
            else: pass
print(cnt)


Failing test case input:
11
13
20
9
10
11
13
33
14
16
12
17

Expected output:
4


Actual output:
11
1


Fixed submission (verdict: Accepted):
import math
n=int(input())
A=[0]*n
cnt=0
for i in range(0,n):
    A[i]=int(input())
for i in range(0,n):
    if A[i]<2: pass
    elif A[i]==2 or A[i]==3 or A[i]==5 or A[i]==7:
        cnt+=1
    else:
        x=int(math.sqrt(A[i])+1)
        for j in range(2,x):
            if A[i]%j==0:
                break
            else: pass
            if j==x-1:
                cnt+=1
            else: pass
print(cnt)
Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):


import math


def is_prime(x):
    
    if x <= 1 or x % 2 == 0:
        return False

    if x == 2:
        return True

    i = 3
    while i <= math.sqrt(x):
        if x % i == 0:
            return False
        i += 2
    return True


def to_int(v):
    return int(v)


if __name__ == '__main__':
    l = to_int(input())
    seq = [to_int(input()) for i in range(l)]
    cnt = 0

    for v in seq:
        if is_prime(v):
            cnt += 1
    print(cnt)

Failing test case input:
11
4
5
9
26
15
22
2
14
27
8
27

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):


import math


def is_prime(x):
    
    if x == 2:
        return True

    if x <= 1 or x % 2 == 0:
        return False

    i = 3
    while i <= math.sqrt(x):
        if x % i == 0:
            return False
        i += 2
    return True


def to_int(v):
    return int(v)


if __name__ == '__main__':
    l = to_int(input())
    seq = [to_int(input()) for i in range(l)]
    cnt = 0

    for v in seq:
        if is_prime(v):
            cnt += 1
    print(cnt)

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
import math
def is_prime(n):
    if n: return False
    p = 2
    while p*p <= n:
        if n % p == 0:
            return False
        p += 1
    return True
c = 0
for i in range(int(input())):
    if is_prime(i): c+= 1
print(c)


Failing test case input:
11
13
20
9
10
11
13
33
14
16
12
17

Expected output:
4


Actual output:
1


Fixed submission (verdict: Accepted):
def is_prime(n):
    for i in range(2,n):
        if i*i > n:
            return True
        if n%i == 0:
            return False
    return True
c = 0
n = int(input())
for _ in range(n):
    data = int(input())
    if is_prime(data): c+= 1
print(c)

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
for i in range(n):
    p = int(input())
    if p in (2,3,5,7):
        continue
    elif not p%2:
        n -= 1
        continue
    for j in range(3,int(p**0.5),2):
        if not p%j:
            n -= 1
            continue
print(n)

Failing test case input:
11
7
8
9
10
11
22
13
14
15
16
17

Expected output:
4


Actual output:
6


Fixed submission (verdict: Accepted):
n = int(input())
for i in range(n):
    p = int(input())
    if not p%2:
        if p != 2:
            n -= 1
        continue
    for j in range(3,int(p**0.5)+1,2):
        if not p%j:
            n -= 1
            break
print(n)
Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
import math
def is_prime(n):
    for i in range(2,n):
        if i*i > n:
            return True
        if n%i == 0:
            return False
    return 1
c = 0
for i in range(int(input())):
    if is_prime(i): c+= 1
print(c)


Failing test case input:
11
6
4
4
27
4
22
13
2
20
8
44

Expected output:
2


Actual output:
6


Fixed submission (verdict: Accepted):
def is_prime(n):
    for i in range(2,n):
        if i*i > n:
            return True
        if n%i == 0:
            return False
    return True
c = 0
n = int(input())
for _ in range(n):
    data = int(input())
    if is_prime(data): c+= 1
print(c)

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
prime_list = [2,3,5,7,11]
def appendp(num):
    for i in range(prime_list[-1], num, 2):
        for j in prime_list:
            if i % j == 0:
                break
            prime_list.append(i)
    
def prime_number():
    n = int(input())
    count = 0
    for _ in range(n):
        a = int(input())
        if a > prime_list[-1]:
            appendp(a)
        if a in prime_list:
            count += 1
    print(count)


if __name__ == "__main__":
    prime_number()

Failing test case input:
11
14
8
9
10
22
12
23
4
4
13
4

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
def isPrime(num):
    if num < 2: return False
    if num == 2: return True
    if num % 2 == 0: return False
    sqrtnum = num ** 0.5
    for i in range(3, int(sqrtnum + 1), 2):
        if num % i == 0:
            return False
    return True


def prime_number():
    n = int(input())
    count = 0
    for _ in range(n):
        a = int(input())
        if isPrime(a):
            count += 1
    print(count)

if __name__ == "__main__":
    prime_number()

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
def isPrime(x):
    if x==2:
        return True
    
    if x<2 or x%2==0:
        return False
    
    for n in range(3,round(x**0.5),2):
        if x%n==0:
            return False
        
    return True     

n=int(input())
num=[int(input()) for i in range(n)]

i=0
for nm in num:
    if isPrime(nm):
        i+=1
        
print(i)

Failing test case input:
11
13
20
9
10
11
13
17
14
15
8
17

Expected output:
5


Actual output:
6


Fixed submission (verdict: Accepted):
def isPrime(x):
    if x==2:
        return True
    
    if x<2 or x%2==0:
        return False
    
    for n in range(3,int(x**0.5)+1,2):
        if x%n==0:
            return False
    return True   

n=int(input())
num=[int(input()) for i in range(n)]

i=0
for nm in num:
    if isPrime(nm):
        i+=1
        
print(i)
Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
import math
n=int(input("n:"))
R=[0]*n
sum=0
for i in range(n):
    R[i]=int(input(""))
for i in range(n):
    s=math.sqrt(R[i])
    s=int(s)+1
    for j in range(2,s+1):
        if R[i]==j:
            sum=sum+1
        if R[i]%j==0:
            break
        if j==s:
            sum=sum+1
print(sum)


Failing test case input:
11
7
8
9
13
11
22
17
14
27
8
17

Expected output:
5


Actual output:
n:5


Fixed submission (verdict: Accepted):
import math
n=int(input())
R=[0]*n
sum=0
for i in range(n):
    R[i]=int(input())
for i in range(n):
    if R[i]<0:
        continue
    s=math.sqrt(R[i])
    s=int(s)+1
    for j in range(2,s+1):
        if R[i]==j:
            sum=sum+1
        if R[i]%j==0:
            break
        if j==s:
            sum=sum+1
print(sum)

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
import math

def prime(a):
	if a==1:
		return 0
	n=2
	while n<math.sqrt(a):
		if a%n==0:
			return 0
		n+=1
	return 1

N=int(input())

count=0
for i in range(N):
	a=int(input())
	count+=prime(a)
print(count)

Failing test case input:
11
7
8
9
10
11
22
13
2
27
8
14

Expected output:
4


Actual output:
5


Fixed submission (verdict: Accepted):
import math

def prime(a):
	if a==1:
		return 0
	n=2
	while n<=math.sqrt(a):
		if a%n==0:
			return 0
		n+=1
	return 1

N=int(input())

count=0
for i in range(N):
	a=int(input())
	count+=prime(a)
print(count)

Problem: p02257
Buggy submission (Python3, verdict: Wrong Answer):
import math

def is_prime(x):
    if x == 2:
        return True

    if (x == 1) or (x % 2 == 0):
        return False

    for i in range(3, math.ceil(math.sqrt(x)), 2):
        if x % i == 0:
            return False

    return True
    
if __name__ == '__main__':
    element_number = int(input())
    input_array = [int(input()) for i in range(element_number)]

    output = 0
    for x in input_array:
        if(is_prime(x)):
            output += 1

    print(output)

Failing test case input:
11
39
20
9
17
9
13
33
5
25
12
17

Expected output:
4


Actual output:
7


Fixed submission (verdict: Accepted):
import math

def is_prime(x):
    if x == 2:
        return True

    if (x == 1) or (x % 2 == 0):
        return False

    for i in range(3, math.ceil(math.sqrt(x))+1, 2):
        if x % i == 0:
            return False

    return True
    
if __name__ == '__main__':
    element_number = int(input())
    input_array = [int(input()) for i in range(element_number)]

    output = 0
    for x in input_array:
        if(is_prime(x)):
            output += 1

    print(output)