Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
from math import gcd
def unzip(strlist,a,b):
    ret = []
    for word in strlist:
        tmp = ""
        for i in range(len(word)):
            tmp += chr(((ord(word[i])-97)*a+b)%26+97)
        ret.append(tmp)
    return ret

n = int(input())
for _ in range(n):
    instr = input().split()
    for a in range(1,26):
        if gcd(1,26)!=1 : continue
        for b in range(26):
            if "this" in unzip(instr, a, b):
                print(" ".join(unzip(instr, a, b)))
            elif "that" in unzip(instr, a, b):
                print(" ".join(unzip(instr, a, b)))

Fixed submission:
def gcd(a, b):
    if a < b:
        a, b = b, a
    if b == 0:
        return a
    return gcd(b, a%b)

def unzip(strlist,a,b):
    ret = []
    for word in strlist:
        tmp = ""
        for i in range(len(word)):
            tmp += chr(((ord(word[i])-97)*a+b)%26+97)
        ret.append(tmp)
    return ret

n = int(input())
for _ in range(n):
    instr = input().split()
    flag = False
    for a in range(1,26):
        if gcd(1,26)!=1 : continue
        if flag: break
        for b in range(26):
            if "this" in unzip(instr, a, b):
                print(" ".join(unzip(instr, a, b)))
                flag = True
                break
            elif "that" in unzip(instr, a, b):
                print(" ".join(unzip(instr, a, b)))
                flag = True
                break
Buggy python submission (verdict: Time Limit Exceeded):
while True:
    r,c = map(int, input().split())
    if (r|c)==0: break

    array = []
    for i in range(r):
        array.append(list(map(int, input().split())))
    num = [0]*c
    for i in range(r):
        for j in range(c):
            num[j] = num[j]*2+array[i][j]

    maxx = -1
    for i in range(1 << r):
        answer = 0
        for j in range(c):
            oksenbei = bin(num[j]^i).count("1")
            answer += max(oksenbei, r-oksenbei)
        maxx = max(maxx, answer)

    print(maxx)

Fixed submission:
while True:
    r,c = map(int, input().split())
    if (r|c)==0: break

    num = [0]*c
    for i in range(r):
        instr = input()
        for j in range(c):
            num[j] = (num[j]<<1) + (instr[2*j]=="1")

    maxx = -1
    for i in range(1 << r):
        answer = 0
        for j in range(c):
            oksenbei = bin(num[j]^i).count("1")
            answer += oksenbei if oksenbei*2//r >= 1 else r-oksenbei
        if maxx < answer:
            maxx = answer

    print(maxx)

Buggy python submission (verdict: Time Limit Exceeded):
while True:
    r,c = map(int, input().split())
    if (r|c)==0: break

    array = []
    for i in range(r):
        array.append(input())
    num = [0]*c
    for i in range(r):
        for j in range(c):
            num[j] = num[j]*2+int(array[i][2*j])

    maxx = -1
    for i in range(1 << r):
        answer = 0
        for j in range(c):
            oksenbei = bin(num[j]^i).count("1")
            answer += max(oksenbei, r-oksenbei)
        maxx = max(maxx, answer)

    print(maxx)

Fixed submission:
while True:
    r,c = map(int, input().split())
    if (r|c)==0: break

    num = [0]*c
    for i in range(r):
        instr = input()
        for j in range(c):
            num[j] = (num[j]<<1) + (instr[2*j]=="1")

    maxx = -1
    for i in range(1 << r):
        answer = 0
        for j in range(c):
            oksenbei = bin(num[j]^i).count("1")
            answer += oksenbei if oksenbei*2//r >= 1 else r-oksenbei
        if maxx < answer:
            maxx = answer

    print(maxx)
Buggy python submission (verdict: Runtime Error):
def listrep(n,m,s):
    tab = [[[0]*(s+1) for j in range(n+1)]
    tab[0][0] = 1
    for i in range(1,n+1):
        for k in range(s+1):
            if i <= k:
                tab[i][k] += tab[i][k-i] + tab[i-1][k-i]
            if j-1 >= m:
                tab[i][k] -= tab[i-1][j-1-m]
    return tab[n][m][s]

while True:
    n,m,s = map(int,input().split())
    if n == 0 : break
    n *= n
    print(listrep(n,m,s))

Fixed submission:
def listrep(n,m,s):
    tab = [[0]*(s+1) for j in range(n+1)]
    tab[0][0] = 1
    for i in range(1,n+1):
        for k in range(s+1):
            if i <= k:
                tab[i][k] += tab[i][k-i] + tab[i-1][k-i]
            if k-1 >= m:
                tab[i][k] -= tab[i-1][k-1-m]
            tab[i][k] %= 100000
    return tab[n][s]

while True:
    n,m,s = map(int,input().split())
    if n == 0 : break
    n *= n
    print(listrep(n,m,s))
Buggy python submission (verdict: Runtime Error):
n,m = map(int,input().split())
lng = []
for _ in range(n-1):
    lng.append(int(input()))
i = 0
sm = 0
for _ in range(m):
    j = i+int(input())
    mv = sum(lng[i:j]) if j > i else sum(lng[j:i])
    sm += mv
    i = j
print(sm%100000)

Fixed submission:
n,m = map(int,input().split())
lng = [0]
for _ in range(n-1):
    lng.append(lng[-1] + int(input()))
i = 0
sm = 0
for _ in range(m):
    j = i+int(input())
    sm += abs(lng[i]-lng[j])
    sm %= 100000
    i = j
print(sm)

Buggy python submission (verdict: Runtime Error):
n,m = map(int,input().split())
lng = []
for _ in range(n-1):
    lng.append(int(input()))
i = 0
sm = 0
for _ in range(m):
    j = i+int(input())
    mv = sum(lng[i:j]) if j > i else sum(lng[j:i])
    sm += mv
    if sm >= 100000: sm -= 100000
    i = j
print(sm)

Fixed submission:
n,m = map(int,input().split())
lng = [0]
for _ in range(n-1):
    lng.append(lng[-1] + int(input()))
i = 0
sm = 0
for _ in range(m):
    j = i+int(input())
    sm += abs(lng[i]-lng[j])
    sm %= 100000
    i = j
print(sm)

Buggy python submission (verdict: Runtime Error):
n,m = map(int,input().split())
lng = []
for _ in range(n-1):
    lng.append(int(input()))
i = 0
sm = 0
for _ in range(m):
    j = i+int(input())
    mv = sum(lng[i:j]) if j > i else sum(lng[j:i])
    sm += mv
    sm %= 100000
    i = j
print(sm)

Fixed submission:
n,m = map(int,input().split())
lng = [0]
for _ in range(n-1):
    lng.append(lng[-1] + int(input()))
i = 0
sm = 0
for _ in range(m):
    j = i+int(input())
    sm += abs(lng[i]-lng[j])
    sm %= 100000
    i = j
print(sm)
Buggy python submission (verdict: Runtime Error):
n = int(input())
dp = [float('inf')]*(n+1)
dp[0] = 0
for i in range(1,n):
    cost = int(input())
    for j in range(i):
        dp[j] = min(dp[j],dp[i-j]+cost)
        dp[i-j] = min(dp[j]+cost,dp[i-j])
    #print(dp)
print(dp[n//2])

Fixed submission:

n = int(input())
dp = [float('inf')]*(n+1)
dp[0] = 0
cost = [int(input()) for _ in range(n-1)]
for i in range(1,n):
    for j in range(i):
        if dp[i-j]+cost[i-1] < dp[j]: dp[j] = dp[i-j]+cost[i-1]# = min(dp[j],dp[i-j]+cost[i-1])
        if dp[j]+cost[i-1] < dp[i-j]: dp[i-j] = dp[j]+cost[i-1]# = min(dp[i-j],dp[j]+cost[i-1])
    #print(dp)
print(dp[n//2])
Buggy python submission (verdict: Runtime Error):

def SimultaneousEquation():
    for line in sys.stdin:
        a,b,c,d,e,f=map(float,line.split())
        y=(c*d-f*a)/(b*d-e*a)
        x=(c-b*y)/a
        print("{0:.3f} {1:.3f}".format(x,y))
        
    

SimultaneousEquation()

Fixed submission:
import sys
def SimultaneousEquation():
    for line in sys.stdin:
        a,b,c,d,e,f=map(float,line.split())
        y=(c*d-f*a)/(b*d-e*a)
        x=(c-b*y)/a
        print("{0:.3f} {1:.3f}".format(x,y))
        
    

#testWriteFile()
SimultaneousEquation()
Buggy python submission (verdict: Runtime Error):
def GcdLCM():
    
    while 1:
        x,y=map(int,input().split())
        gcd = Gcd(x,y)
        lcm = int(x*y/gcd)

        print("{} {}".format(gcd,lcm))
       
def Gcd(x,y):
    while x!=0:
        x,y=y%x,x
    return y
        
    
GcdLCM()

Fixed submission:
import sys
def GcdLCM():
    for line in sys.stdin:
        x,y=map(int,line.split())
        if x==None:
            break
        
        gcd = Gcd(x,y)
        lcm = int(x*y/gcd)

        print("{} {}".format(gcd,lcm))
       
def Gcd(x,y):
    while x!=0:
        x,y=y%x,x
    return y
        
    
GcdLCM()

Buggy python submission (verdict: Runtime Error):
def GcdLCM():
    
    while 1:
        x,y=map(int,input().split())
        if x==None:
            break
        
        gcd = Gcd(x,y)
        lcm = int(x*y/gcd)

        print("{} {}".format(gcd,lcm))
       
def Gcd(x,y):
    while x!=0:
        x,y=y%x,x
    return y
        
    
GcdLCM()

Fixed submission:
import sys
def GcdLCM():
    for line in sys.stdin:
        x,y=map(int,line.split())
        if x==None:
            break
        
        gcd = Gcd(x,y)
        lcm = int(x*y/gcd)

        print("{} {}".format(gcd,lcm))
       
def Gcd(x,y):
    while x!=0:
        x,y=y%x,x
    return y
        
    
GcdLCM()

Buggy python submission (verdict: Runtime Error):
def GcdLCM():
    
    for line in sys.stdin:
        x,y=map(int,line.split())
        if x==None:
            break
        
        gcd = Gcd(x,y)
        lcm = int(x*y/gcd)

        print("{} {}".format(gcd,lcm))
       
def Gcd(x,y):
    while x!=0:
        x,y=y%x,x
    return y
        
    
GcdLCM()

Fixed submission:
import sys
def GcdLCM():
    for line in sys.stdin:
        x,y=map(int,line.split())
        if x==None:
            break
        
        gcd = Gcd(x,y)
        lcm = int(x*y/gcd)

        print("{} {}".format(gcd,lcm))
       
def Gcd(x,y):
    while x!=0:
        x,y=y%x,x
    return y
        
    
GcdLCM()
Buggy python submission (verdict: Runtime Error):

import string
def CaesarCipher():
    
    low=str.ascii_lowercase
    
    for cry in sys.stdin: 
        for i in range(1,27):
            
            dec=cry.translate(str.maketrans(low,low[i:]+low[:i]))
    
            if 'this' in dec or 'that' in dec or 'the' in dec:
                print(dec)
            
                
    
CaesarCipher()

Fixed submission:

import string
import sys

def CaesarCipher():
    
    low=string.ascii_lowercase
    
    for cry in sys.stdin: 
        for i in range(1,27):
            
            dec=cry.translate(str.maketrans(low,low[i:]+low[:i]))
    
            if 'this' in dec or 'that' in dec or 'the' in dec:
                print(dec[:-1])
            
                
    
CaesarCipher()

Buggy python submission (verdict: Runtime Error):

import string
def CaesarCipher():
    
    low=string.ascii_lowercase
    
    for cry in sys.stdin: 
        for i in range(1,27):
            
            dec=cry.translate(str.maketrans(low,low[i:]+low[:i]))
    
            if 'this' in dec or 'that' in dec or 'the' in dec:
                print(dec)
            
                
    
CaesarCipher()

Fixed submission:

import string
import sys

def CaesarCipher():
    
    low=string.ascii_lowercase
    
    for cry in sys.stdin: 
        for i in range(1,27):
            
            dec=cry.translate(str.maketrans(low,low[i:]+low[:i]))
    
            if 'this' in dec or 'that' in dec or 'the' in dec:
                print(dec[:-1])
            
                
    
CaesarCipher()

Buggy python submission (verdict: Runtime Error):

import string
def CaesarCipher():
    
    low=string.ascii_lowercase
    
    for cry in sys.stdin: 
        for i in range(1,27):
            
            dec=cry.translate(str.maketrans(low,low[i:]+low[:i]))
    
            if 'this' in dec or 'that' in dec or 'the' in dec:
                print(dec)
            
                
    
CaesarCipher()

Fixed submission:

import string
import sys

def CaesarCipher():
    
    low=string.ascii_lowercase
    
    for cry in sys.stdin: 
        for i in range(1,27):
            
            dec=cry.translate(str.maketrans(low,low[i:]+low[:i]))
    
            if 'this' in dec or 'that' in dec or 'the' in dec:
                print(dec[:-1])
            
                
    
CaesarCipher()
Buggy python submission (verdict: Runtime Error):
import sys
arr = [0 for i in range(0,101)]
for i in sys.stdin:
    arr[int(i)] += 1

max = max(arr)
for i in for(0,101):
    if arr[i]==max:
        print(i)

Fixed submission:
import sys
 
def ModeValue():
    mode=[0 for i in range(0,101)]
    
    for n in sys.stdin:
        mode[int(n)]+=1

    maxN=max(mode)

    for i in range(0,101):
        if mode[i]==maxN:
            print(i)
            
ModeValue()
Buggy python submission (verdict: Runtime Error):
def Aizu_PR():
    n = int(input())

    for _ in range(n):
        print(input().replace("Hoshino","Hoshina")

Aizu_PR()


Fixed submission:
def Aizu_PR():
    for _ in range(int(input())):
        print(input().replace("Hoshino","Hoshina"))

Aizu_PR()
Buggy python submission (verdict: Runtime Error):
import sys

i = int(raw_input())

print(i**3)

Fixed submission:
import sys

i = int(input())

print(i**3)
Buggy python submission (verdict: Runtime Error):

w = int(input())
h = int(input())

print((w+h)*2)

Fixed submission:

numbers = list(map(int,input().split()))
print(str(numbers[0]*numbers[1])+" "+str((numbers[0]+numbers[1])*2))

Buggy python submission (verdict: Runtime Error):
numbers = list(map(int,input().split()))
print((numbers[0]*numbers[1])+" "+(numbers[0]+numbers[1])*2)

Fixed submission:

numbers = list(map(int,input().split()))
print(str(numbers[0]*numbers[1])+" "+str((numbers[0]+numbers[1])*2))
Buggy python submission (verdict: Runtime Error):
    num = list(map(int,input().split()))
    a = num[0]
    b = num[1]
    output = str(a)
    
    if a<b:
        output=output+" < ";
    elif a>b:
        output=output+" > ";
    else:
        output=output+" = ";

    print(output+str(b))

Fixed submission:
a,b=map(int,input().split())
s=""
if a>b:
    s=">"
elif a<b:
    s="<"
else:
    s="=="
print("a",s,"b")
Buggy python submission (verdict: Runtime Error):
a = [x for x in range(9)]
for i in a:
    for j in a:
        print('{}x{}={}'.format(i + 1, j + 1, (i + 1) * (j + 1))

Fixed submission:
a = range(1, 10)
[print('{}x{}={}'.format(i, j, i * j)) for i in a for j in a]

Buggy python submission (verdict: Runtime Error):
[print('{}x{}={}').format(i, j, i * j) for j in range(1, 10) for i in range(1, 10)]

Fixed submission:
a = range(1, 10)
[print('{}x{}={}'.format(i, j, i * j)) for i in a for j in a]
Buggy python submission (verdict: Runtime Error):
rank = sorted([int(input()) for i in range(10)], reverse=True)
print('\n'.join(rank[:3]) + '\n')

Fixed submission:
rank = sorted([int(input()) for i in range(10)], reverse=True)
print('\n'.join(map(str, rank[:3])))
Buggy python submission (verdict: Runtime Error):
import sys
a = [print(len(sum(map(int, line.split())))) for line in sys.stdin]

Fixed submission:
import sys
[print(len(str(sum(map(int, line.split()))))) for line in sys.stdin]
Buggy python submission (verdict: Runtime Error):
print(pow(int(input())), 3)

Fixed submission:
x = int(input())
y = 3
p = pow(x, y)
print(p)
Buggy python submission (verdict: Runtime Error):
x, y = [int(i) for i in input.split(" ")]
print(x*y)

Fixed submission:
x,y = [int(i) for i in input().split()]
area = x*y
length = (x*2)+(y*2)
print(area,length)

Buggy python submission (verdict: Runtime Error):
input = [iint(i) for i in input().split(" ")]
print(input[0]*input[1], input[0]*2+input[1]*2)

Fixed submission:
x,y = [int(i) for i in input().split()]
area = x*y
length = (x*2)+(y*2)
print(area,length)

Buggy python submission (verdict: Runtime Error):
x,y = [int(i) for i in input().split()]
area = x*y
length = (x*2)+(y*2)
print(area+" "+length)

Fixed submission:
x,y = [int(i) for i in input().split()]
area = x*y
length = (x*2)+(y*2)
print(area,length)
Buggy python submission (verdict: Runtime Error):
while True:

    a = input()
    # if a == "0 0 0 0 0":
    #     break
    a = a.split(" ")
    b = []
    sum = 0
    for i in a:
        b.append(int(i))
        sum += int(i)
    if sum == 0:
        break
    c = input()
    c = c.split(" ")
    d = []
    for i in c:
        d.append(int(i))
    if b[4] == d[0]:
        print(0)
        continue
    ans = 0
    x = b[4]
    for i in d:
        for e in range(10001):
            x = (b[1] * x + b[2]) % b[3]
            print("x: " ,x)
            ans = ans + 1
            if x == i:
                break
    if ans >= 10001:
        ans = -1
    print(ans)

quit()


Fixed submission:
a = int(input())
b = []
clo = True
for i in range(a):
    b.append(input())

c = int(input())
for i in range(c):
    d = input()
    for j in range(a):
        if d == b[j]:
            know = True
            break
        else:
            know = False
    if know:
        if clo:
            clo = False
            print("Opened by " + d)
        else:
            clo = True
            print("Closed by " + d)
    else:
        print("Unknown " + d)
Buggy python submission (verdict: Runtime Error):
values = []
i = 0
while True:
    values.append([int(x) for x in input().split()])
    if [] == values[i] and 0 == len(values[i]):
        values.pop()
        break
    else:
        i += 1

sum = 0
digit = 0
for x, y in values:
    sum = x + y
    digit = 0
    while sum >= 1:
        sum //= 10
        digit += 1
    print(digit)

Fixed submission:
import sys
values = []
for line in sys.stdin:
    values.append([int(x) for x in line.split()])
digit = 0
for x, y in values:
    sum = x + y; digit = 0
    while sum >= 1:
        sum //= 10
        digit += 1
    print(digit)
Buggy python submission (verdict: Runtime Error):
import sys
values = []
for line in sys.stdin:
    values.append(int(line))
ans = [1 for i in range(10) for j in range(10) for k in range(10) for l in range(10) if n == i + j + k + l]
print(ans.count(1))

Fixed submission:
import sys
values = []
for line in sys.stdin:
    values.append(int(line))
    
for v in values:
    ans = [1 for i in range(10) for j in range(10) for k in range(10) for l in range(10) if v == i + j + k + l]
    print(ans.count(1))
Buggy python submission (verdict: Runtime Error):
values = input()
height, width = [int(x) for x in values.split()]
print(' '.join(height * width, height * 2 + width * 2))

Fixed submission:
values = input()
height, width = [int(x) for x in values.split()]
print(height * width,  height * 2 + width * 2)
Buggy python submission (verdict: Runtime Error):
import math
r = int(input())
ret = r * r * math.pi
print('{0:.5f} {1:.5f}'.format(ret, ret))

Fixed submission:
import math
r = float(input())
print('{0:.6f} {1:.6f}'.format(r * r * math.pi, (r + r) * math.pi))

Buggy python submission (verdict: Runtime Error):
r = int(input())
ret = r * r * 3.141592
print('{0:.5f} {1:.5f}'.format(ret, ret))

Fixed submission:
import math
r = float(input())
print('{0:.6f} {1:.6f}'.format(r * r * math.pi, (r + r) * math.pi))

Buggy python submission (verdict: Runtime Error):
import math
r = int(input())
ret = r * r * math.pi
print('{0:.6f} {1:.6f}'.format(ret, ret))

Fixed submission:
import math
r = float(input())
print('{0:.6f} {1:.6f}'.format(r * r * math.pi, (r + r) * math.pi))

Buggy python submission (verdict: Runtime Error):
import math
r = int(input())
print('{0:.6f} {1:.6f}'.format(r * r * math.pi, (r + r) * math.pi))

Fixed submission:
import math
r = float(input())
print('{0:.6f} {1:.6f}'.format(r * r * math.pi, (r + r) * math.pi))
Buggy python submission (verdict: Runtime Error):
def Input():
    matrix = []
    row, col = [int(x) for x in input().split()]
    i = row
    while i > 0:
        matrix.append([int(y) for y in input().split()])
        i -=  1
    return matrix

def calcTotalOfRowAndCol(matrix):
    for l in matrix:
        total = 0
        for val in l:
            total += val
        l.append(total)
    matrix.append([])
    for i in range(6):
        total = 0
        j = 0
        while j < 4:
            total += matrix[j][i]
            j += 1
        matrix[4].insert(i, total)

    return matrix

def Output(matrix):
    for l in matrix:
        print(' '.join(str(x) for x in l))

if __name__ == '__main__':
    matrix = Input()
    matrix = calcTotalOfRowAndCol(matrix)
    Output(matrix)

Fixed submission:
def calcTotalOfRowAndCol(matrix, r, c):
    for l in matrix:
        total = 0
        for val in l:
            total += val
        l.append(total)
    matrix.append([])
    for i in range(c + 1):
        total = 0
        j = 0
        while j < r:
            total += matrix[j][i]
            j += 1
        matrix[r].insert(i, total)

if __name__ == '__main__':
    matrix = []
    row, col = [int(x) for x in input().split()]
    i = row
    while i > 0:
        matrix.append([int(y) for y in input().split()])
        i -= 1
    calcTotalOfRowAndCol(matrix, row, col)
    for l in matrix:
        print(' '.join(str(x) for x in l))

Buggy python submission (verdict: Runtime Error):
def Input():
    matrix = []
    row, col = [int(x) for x in input().split()]
    i = row
    while i > 0:
        matrix.append([int(y) for y in input().split()])
        i -=  1
    return matrix

def calcTotalOfRowAndCol(matrix):
    for l in matrix:
        total = 0
        for val in l:
            total += val
        l.append(total)
    matrix.append([])
    for i in range(6):
        total = 0
        j = 0
        while j < 4:
            total += matrix[j][i]
            j += 1
        matrix[4].insert(i, total)

    return matrix

def Output(matrix):
    for l in matrix:
        print(' '.join(str(x) for x in l))

if __name__ == '__main__':
    matrix1 = Input()
    matrix2 = calcTotalOfRowAndCol(matrix1)
    Output(matrix2)

Fixed submission:
def calcTotalOfRowAndCol(matrix, r, c):
    for l in matrix:
        total = 0
        for val in l:
            total += val
        l.append(total)
    matrix.append([])
    for i in range(c + 1):
        total = 0
        j = 0
        while j < r:
            total += matrix[j][i]
            j += 1
        matrix[r].insert(i, total)

if __name__ == '__main__':
    matrix = []
    row, col = [int(x) for x in input().split()]
    i = row
    while i > 0:
        matrix.append([int(y) for y in input().split()])
        i -= 1
    calcTotalOfRowAndCol(matrix, row, col)
    for l in matrix:
        print(' '.join(str(x) for x in l))
Buggy python submission (verdict: Runtime Error):
a=input()
print(a*a*a)


Fixed submission:
x=int(input())
print(x**3)

Buggy python submission (verdict: Runtime Error):
a=input()
b=a*a*a
print(b)


Fixed submission:
x=int(input())
print(x**3)
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
count=0
for i in range(N):
    n=int(input())
    s=2
    for j in range(n):
        if (n==2):
            count+=1
            break
        tmp=n%s
        if (tmp!=0):
            s+=1
            if (s==n):
                count+=1
                break
        else:
            break
print(count)

Fixed submission:
import math
def prime(n):
    if (n==2):
        return True
    if(n<2 or n%2==0):
        return False
    i=3
    while(i<=math.sqrt(n)):
        if (n%i==0):
            return False
        i=i+2
    return True

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

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
count=0
for i in range(N):
    n=int(input())
    s=2
    for j in range(n):
        if (n==2):
            count+=1
            break
        tmp=n%s
        if (tmp!=0):
            s+=1
            if (s==n):
                count+=1
                break
        else:
            break
print(count)

Fixed submission:
import math
def prime(n):
    if (n==2):
        return True
    if(n<2 or n%2==0):
        return False
    i=3
    while(i<=math.sqrt(n)):
        if (n%i==0):
            return False
        i=i+2
    return True

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

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
count=0
for i in range(N):
    n=int(input())
    s=2
    for j in range(n):
        if (n==2):
            count+=1
            break
        tmp=n%s
        if (tmp!=0):
            s+=1
            if (s==n):
                count+=1
                break
        else:
            break
print(count)

Fixed submission:
import math
def prime(n):
    if (n==2):
        return True
    if(n<2 or n%2==0):
        return False
    i=3
    while(i<=math.sqrt(n)):
        if (n%i==0):
            return False
        i=i+2
    return True

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