Buggy python submission (verdict: Time Limit Exceeded):
def judgePrime(n):
  result = True
  for i in xrange(2, n):
    if n % i == 0:
      result = False
      break
  return result

n = int(raw_input())
count = 0

for i in xrange(n):
  if judgePrime(int(raw_input())):
    count += 1

print count

Fixed submission:
import pdb

n = int(raw_input())
count = 0
for x in xrange(n):
  target = int(raw_input())
  # pdb.set_trace()
  if target == 2:
    count += 1
  elif target < 3 or not target & 1:
    continue
  else:
    if pow(2, target - 1, target) == 1:
      count += 1

print count

Buggy python submission (verdict: Time Limit Exceeded):
def judgePrime(n):
  result = True
  for i in xrange(2, n):
    if n % i == 0:
      result = False
      break
  return result

n = int(raw_input())
count = 0

for i in xrange(n):
  if judgePrime(int(raw_input())):
    count += 1

print count

Fixed submission:
import pdb

n = int(raw_input())
count = 0
for x in xrange(n):
  target = int(raw_input())
  # pdb.set_trace()
  if target == 2:
    count += 1
  elif target < 3 or not target & 1:
    continue
  else:
    if pow(2, target - 1, target) == 1:
      count += 1

print count

Buggy python submission (verdict: Runtime Error):
def judgePrime(n):
  result = True
  for i in xrange(2, n):
    if n % i == 0:
      result = False
      break
  return result

def getPrimeNumFromList(list):
  count = 0
  for i in xrange(len(list)):
    target = 0
    if i == 0:
      target = list[0]
      if judgePrime(target):
        count += 1
    else:

  return count

n = int(raw_input())
list = []
for i in xrange(n):
  list.append(int(raw_input()))
list.sort()
#print judgePrime(list[len(list) - 1])
print getPrimeNumFromList(list)

Fixed submission:
import pdb

n = int(raw_input())
count = 0
for x in xrange(n):
  target = int(raw_input())
  # pdb.set_trace()
  if target == 2:
    count += 1
  elif target < 3 or not target & 1:
    continue
  else:
    if pow(2, target - 1, target) == 1:
      count += 1

print count

Buggy python submission (verdict: Runtime Error):
def judgePrime(n):
  result = True
  for i in xrange(2, n):
    if n % i == 0:
      result = False
      break
  return result

def getPrimeNumFromList(list):
  count = 0
  for i in xrange(len(list)):
    target = 0
    if i == 0:
      target = list[0]
      if judgePrime(target):
        count += 1
    else:

  return count

n = int(raw_input())
list = []
for i in xrange(n):
  list.append(int(raw_input()))
list.sort()
print judgePrime(list[len(list) - 1])
# print getPrimeNumFromList(list)

Fixed submission:
import pdb

n = int(raw_input())
count = 0
for x in xrange(n):
  target = int(raw_input())
  # pdb.set_trace()
  if target == 2:
    count += 1
  elif target < 3 or not target & 1:
    continue
  else:
    if pow(2, target - 1, target) == 1:
      count += 1

print count

Buggy python submission (verdict: Time Limit Exceeded):
def judgePrime(n):
  result = True
  for i in xrange(2, n):
    if n % i == 0:
      result = False
      break
  return result

def getPrimeNumFromList(list):
  count = 0
  for i in xrange(len(list)):
    target = 0
    if i == 0:
      target = list[0]
      if judgePrime(target):
        count += 1
      else:
        pass

  return count

n = int(raw_input())
list = []
for i in xrange(n):
  list.append(int(raw_input()))
list.sort()

count = 0
for i in xrange(n):
  if judgePrime(list[i]):
    count += 1
print count
# print getPrimeNumFromList(list)

Fixed submission:
import pdb

n = int(raw_input())
count = 0
for x in xrange(n):
  target = int(raw_input())
  # pdb.set_trace()
  if target == 2:
    count += 1
  elif target < 3 or not target & 1:
    continue
  else:
    if pow(2, target - 1, target) == 1:
      count += 1

print count

Buggy python submission (verdict: Time Limit Exceeded):
def judgePrime(n):
  result = True
  for i in xrange(2, int(round(n))):
    if n % i == 0:
      result = False
      break
  return result

def getPrimeNumFromList(list):
  count = 0
  for i in xrange(len(list)):
    target = 0
    if i == 0:
      target = list[0]
      if judgePrime(target):
        count += 1
      else:
        pass

  return count

n = int(raw_input())
list = []
for i in xrange(n):
  list.append(int(raw_input()))
list.sort()

count = 0
for i in xrange(n):
  if judgePrime(list[i]):
    count += 1
print count

# print judgePrime(list[len(list) - 1])

Fixed submission:
import pdb

n = int(raw_input())
count = 0
for x in xrange(n):
  target = int(raw_input())
  # pdb.set_trace()
  if target == 2:
    count += 1
  elif target < 3 or not target & 1:
    continue
  else:
    if pow(2, target - 1, target) == 1:
      count += 1

print count

Buggy python submission (verdict: Time Limit Exceeded):
def judgePrime(n):
  result = True
  for i in xrange(2, int(round(n))):
    if n % i == 0:
      result = False
      break
  return result

def getPrimeNumFromList(list):
  count = 0
  for i in xrange(len(list)):
    target = 0
    if i == 0:
      target = list[0]
      if judgePrime(target):
        count += 1
      else:
        pass

  return count

n = int(raw_input())
list = []

for i in xrange(n):
  list.append(int(raw_input()))
list.sort()

prime_list = []
all_list = range(2, list[len(list) - 1] + 1)

while True:
  v = all_list.pop(0)
  prime_list.append(v)
  # print "all_list : "
  # print all_list
  # print "prime_list : "
  # print prime_list
  for i in xrange(len(all_list)):
    if i >= len(all_list):
      break
    elif all_list[i] % v == 0:
      all_list.pop(i)
      i -= 1
  if len(all_list) == 0:
    break
  elif prime_list[len(prime_list) - 1] ^ 2 >= all_list[len(all_list) - 1]:
    prime_list.append(all_list)
    break

count = 0
for i in xrange(len(prime_list)):
  if prime_list[i] in list:
    count += 1

print count

Fixed submission:
import pdb

n = int(raw_input())
count = 0
for x in xrange(n):
  target = int(raw_input())
  # pdb.set_trace()
  if target == 2:
    count += 1
  elif target < 3 or not target & 1:
    continue
  else:
    if pow(2, target - 1, target) == 1:
      count += 1

print count

Buggy python submission (verdict: Time Limit Exceeded):
def judgePrime(n):
  result = True
  for i in xrange(2, int(round(n))):
    if n % i == 0:
      result = False
      break
  return result

def getPrimeNumFromList(list):
  count = 0
  for i in xrange(len(list)):
    target = 0
    if i == 0:
      target = list[0]
      if judgePrime(target):
        count += 1
      else:
        pass

  return count

n = int(raw_input())
list = []

for i in xrange(n):
  list.append(int(raw_input()))
list.sort()

prime_list = []
all_list = range(2, list[len(list) - 1] + 1)

while True:
  v = all_list.pop(0)
  prime_list.append(v)
  # print "all_list : "
  # print all_list
  # print "prime_list : "
  # print prime_list
  for i in xrange(len(all_list)):
    if i >= len(all_list):
      break
    elif all_list[i] % v == 0:
      all_list.pop(i)
      i -= 1
  if len(all_list) == 0:
    break
  elif prime_list[len(prime_list) - 1] ^ 2 >= all_list[len(all_list) - 1]:
    prime_list.append(all_list)
    break

count = 0
for i in xrange(len(prime_list)):
  if prime_list[i] in list:
    count += 1

print count

Fixed submission:
import pdb

n = int(raw_input())
count = 0
for x in xrange(n):
  target = int(raw_input())
  # pdb.set_trace()
  if target == 2:
    count += 1
  elif target < 3 or not target & 1:
    continue
  else:
    if pow(2, target - 1, target) == 1:
      count += 1

print count

Buggy python submission (verdict: Time Limit Exceeded):
import pdb

def judgePrime(n):
  result = True
  for i in xrange(2, int(round(n))):
    if n % i == 0:
      result = False
      break
  return result

def getPrimeNumFromList(list):
  count = 0
  for i in xrange(len(list)):
    target = 0
    if i == 0:
      target = list[0]
      if judgePrime(target):
        count += 1
      else:
        pass

  return count

n = int(raw_input())
list = []

for i in xrange(n):
  list.append(int(raw_input()))
list.sort()

prime_list = []

while True:
  v = list.pop(0)
  if not judgePrime(v):
    continue
  prime_list.append(v)
  # print "list : "
  # print list
  # print "prime_list : "
  # print prime_list
  i = 0
  while True:
    # print "i = " + str(i)
    if i >= len(list):
      break
    elif list[i] % v == 0:
      list.pop(i)
      # print "i = " + str(i) + ", list: "
      # print list
    else:
      i += 1
  if len(list) == 0:
    break
  elif prime_list[len(prime_list) - 1] ^ 2 >= list[len(list) - 1]:
    prime_list.append(list)
    break

print len(prime_list)

Fixed submission:
import pdb

n = int(raw_input())
count = 0
for x in xrange(n):
  target = int(raw_input())
  # pdb.set_trace()
  if target == 2:
    count += 1
  elif target < 3 or not target & 1:
    continue
  else:
    if pow(2, target - 1, target) == 1:
      count += 1

print count

Buggy python submission (verdict: Runtime Error):
import pdb

def judgePrime(n):
  result = True
  i = 2
  while i < int(round(n)):
    if n % i == 0:
      result = False
      break
    i += 1
  return [result, i]

def getPrimeNumFromList(list):
  count = 0
  for i in xrange(len(list)):
    target = 0
    if i == 0:
      target = list[0]
      if judgePrime(target):
        count += 1
      else:
        pass

  return count

n = int(raw_input())
list = []

for i in xrange(n):
  list.append(int(raw_input()))
list.sort()

prime_list = []

while True:
  v = list.pop(0)
  result = judgePrime(v)
  if result[0]:
    # pdb.set_trace()
    prime_list.append(v)
  else:
    v = result[1]
  # print "list : "
  # print list
  # print "prime_list : "
  # print prime_list
  i = 0
  while True:
    # print "i = " + str(i)
    if i >= len(list):
      break
    elif list[i] % v == 0:
      list.pop(i)
      # print "i = " + str(i) + ", list: "
      # print list
    else:
      i += 1
  if len(list) == 0:
    break
  elif prime_list[len(prime_list) - 1] ^ 2 >= list[len(list) - 1]:
    prime_list.append(list)
    break

print len(prime_list)

Fixed submission:
import pdb

n = int(raw_input())
count = 0
for x in xrange(n):
  target = int(raw_input())
  # pdb.set_trace()
  if target == 2:
    count += 1
  elif target < 3 or not target & 1:
    continue
  else:
    if pow(2, target - 1, target) == 1:
      count += 1

print count