Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
n = [i for i in range(1000,10001,1000)]
m = int(input())
for i in n:
    if i > m:
        a = i - m
        break
    # break
print(a)

Fixed submission:
n = [i for i in range(1000,10001,1000)]
m = int(input())
for i in n:
    if i > m or i == m:
        a = i - m
        break
print(a)
Buggy python submission (verdict: Runtime Error):
alpga = input()
if alpha == isupper():
  print('A')
else:
  print('a')

Fixed submission:
alpha = input()
if alpha.isupper() == True:
  print('A')
else:
  print('a')
Buggy python submission (verdict: Runtime Error):
import numpy
n = int(input())
# for i in range(n):
#     m = int(input())
#     k = k*m
# op = 1
p = list(map(int,input().split()))
# for i in p:
#     op = op*i
op = numpy.prod(p)
if op > 10**18:
    print(-1)
else:
    print(op)

Fixed submission:
a,b = map(int,input().split())
print(a*b)

Buggy python submission (verdict: Runtime Error):
a,b = map(int,inout().split())
print(a*b)

Fixed submission:
a,b = map(int,input().split())
print(a*b)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
# for i in range(n):
#     m = int(input())
#     k = k*m
op = 1
p = list(map(int,input().split()))
p.sort()
for i in p:
    op = op*i

if op > 10**18:
    print(-1)
else:
    print(op)

Fixed submission:
n = int(input())
# for i in range(n):
#     m = int(input())
#     k = k*m
op = 1
p = list(map(int,input().split()))
p.sort()
for i in p:
    op = op*i

    if op > 10**18:
        print(-1)
        exit(0)

print(op)

Buggy python submission (verdict: Time Limit Exceeded):
import math
n = int(input())
p = list(map(int,input().split()))
# print(p)
op = math.prod(p)
# print(op)
if op > 10**18:
    print(-1)
else:
    print(op)

Fixed submission:
n = int(input())
# for i in range(n):
#     m = int(input())
#     k = k*m
op = 1
p = list(map(int,input().split()))
p.sort()
for i in p:
    op = op*i

    if op > 10**18:
        print(-1)
        exit(0)

print(op)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
op = 1
p = list(map(int,input().split()))
for i in p:
    op = op*i

if op > 10**18:
    print(-1)
else:
    print(op)

Fixed submission:
n = int(input())
# for i in range(n):
#     m = int(input())
#     k = k*m
op = 1
p = list(map(int,input().split()))
p.sort()
for i in p:
    op = op*i

    if op > 10**18:
        print(-1)
        exit(0)

print(op)
Buggy python submission (verdict: Runtime Error):
a,b,c,d = map(int,input().split())
ta = 0
aok = 0
while True:
    ta = c-b
    c = ta
    if c <=0:
        print("Yes")
        break
    aok = a - d
    a = aok
    if a <=0:
        print("No")
        break

       

    



Fixed submission:
s, w = map(int, input().split())
if w >= s:
    print("unsafe")
else:
    print("safe")
Buggy python submission (verdict: Time Limit Exceeded):
newlst = []
lst =[]
m = int(input())
while m > 0:
    a = str(input())
    lst.append(a)
    m = m -1
for j in lst:
    if j not in newlst:
        newlst.append(j)
print(len(newlst))


Fixed submission:
newlst = []
lst =[]
m = int(input())
while m > 0:
    a = str(input())
    lst.append(a)
    m = m -1
newlst = list(dict.fromkeys(lst))
print(len(newlst))

Buggy python submission (verdict: Time Limit Exceeded):
newlst = []
lst =[]
m = int(input())
for i in range(m):
    a = str(input())
    lst.append(a)
for j in lst:
    if j not in newlst:
        newlst.append(j)
print(len(newlst))

Fixed submission:
newlst = []
lst =[]
m = int(input())
while m > 0:
    a = str(input())
    lst.append(a)
    m = m -1
newlst = list(dict.fromkeys(lst))
print(len(newlst))
Buggy python submission (verdict: Runtime Error):
days, assi = map(int, input().split())
lst = []
for i in range(assi):
    i = int(input())
    lst.append(i)
    tot = sum(lst)
if (days > tot):
    print(days-tot)
elif (days == tot):
    print(days-tot)
else:
    print('-1')


Fixed submission:
days , assi = map(int,input().split())
lst = []
lst = [int(i) for i in input().split()]
tot = sum(lst)
if (tot>days):
    print(-1)
else:
    print(days-tot)

Buggy python submission (verdict: Runtime Error):
days, assi = map(int, input().split())
lst = []
while(assi > 1):
    a = list(map(int, input().split()))
    assi -= 1
    tot = sum(a)
if (days > tot):
    print(days-tot)
elif (days == tot):
    print(days-tot)
else:
    print('-1')


Fixed submission:
days , assi = map(int,input().split())
lst = []
lst = [int(i) for i in input().split()]
tot = sum(lst)
if (tot>days):
    print(-1)
else:
    print(days-tot)

Buggy python submission (verdict: Runtime Error):
days , assi = map(int,input().split())
lst = []
while(assi > 0):
    a = int(input())
    assi -= 1
    lst.append(a)
    tot = sum(lst)
if (days > tot):
    print(days-tot)
elif (days == tot):
    print(days-tot)
else:
    print('-1')

Fixed submission:
days , assi = map(int,input().split())
lst = []
lst = [int(i) for i in input().split()]
tot = sum(lst)
if (tot>days):
    print(-1)
else:
    print(days-tot)

Buggy python submission (verdict: Runtime Error):
days = int(input())
assi = int(input())
lst = []
while(assi > 0):
    a = int(input())
    assi -= 1
    lst.append(a)
    tot = sum(lst)
if (days > tot):
    print(days-tot)
elif (days == tot):
    print(days-tot)
else:
    print('-1')

Fixed submission:
days , assi = map(int,input().split())
lst = []
lst = [int(i) for i in input().split()]
tot = sum(lst)
if (tot>days):
    print(-1)
else:
    print(days-tot)

Buggy python submission (verdict: Runtime Error):
days = int(input())
assi = int(input())
lst = []
while(assi > 0):
    a = int(input())
    assi -= 1
    lst.append(a)
    tot = sum(lst)
if (days > tot):
    print(days-tot)
elif (tot == days):
    print(days-tot)
else:
    print('-1')

Fixed submission:
days , assi = map(int,input().split())
lst = []
lst = [int(i) for i in input().split()]
tot = sum(lst)
if (tot>days):
    print(-1)
else:
    print(days-tot)
Buggy python submission (verdict: Runtime Error):
x,y = map(int,input().split())

if x >= 51:
    print("No")
    sys.exit

if y % 2 == 0 and y >= 2 * x and y <= 4 * x:
    print("Yes")
else:
    print("No")

Fixed submission:
x,y = map(int,input().split())

if y % 2 == 0 and y >= 2 * x and y <= 4 * x:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input()) - 1
A = list(map(int, input().split()))

ans = int(A[N])

while N > 0:
    ans = ans * A[N-1]
    N = N-1

if ans > 10 ** 18:
    print(-1)
else:
    print(ans)

Fixed submission:
N = int(input()) - 1
A = list(map(int, input().split()))

ans = int(A[N])

if 0 in A:
    ans = 0
else:
    while N > 0:
        ans = ans * A[N-1]
        N = N-1
        if ans > 10 ** 18:
            N = 0
        else:
            N = N

if ans > 10 ** 18:
    print(-1)
else:
    print(ans)
Buggy python submission (verdict: Runtime Error):
N = input()
R = N % 1000
if R == 0:
    print(0)
else:
    print(abs(R-1000))

Fixed submission:
N = int(input())
R = N % 1000
if R == 0:
    print(0)
else:
    print(abs(R-1000))

Buggy python submission (verdict: Runtime Error):
N = int(input())
if N%1000 == 0:
    print(0)
else:
    x = int(abs((n % 1000) - 1000))
    print(x)

Fixed submission:
N = int(input())
R = N % 1000
if R == 0:
    print(0)
else:
    print(abs(R-1000))

Buggy python submission (verdict: Runtime Error):
N = int(input())
R = N % 1000
if R = 0:
    print(0)
else:
    print(abs(R-1000))

Fixed submission:
N = int(input())
R = N % 1000
if R == 0:
    print(0)
else:
    print(abs(R-1000))

Buggy python submission (verdict: Runtime Error):
N = input()
R = N % 1000
if R = 0:
    print(0)
else:
    print(abs(R-1000))

Fixed submission:
N = int(input())
R = N % 1000
if R == 0:
    print(0)
else:
    print(abs(R-1000))

Buggy python submission (verdict: Runtime Error):
N = input()
R = N % 1000

if R = 0:
    print(0)

else:
    print(abs(R-1000))

Fixed submission:
N = int(input())
R = N % 1000
if R == 0:
    print(0)
else:
    print(abs(R-1000))

Buggy python submission (verdict: Runtime Error):
N = input()
R = N%1000

if R == 0:
    print(0)

else :
    print(abs(R-1000))

Fixed submission:
N = int(input())
R = N % 1000
if R == 0:
    print(0)
else:
    print(abs(R-1000))
Buggy python submission (verdict: Runtime Error):
contest_1 == "ABC"
contest_2 == "ARC"

S = input()

if S == contest_1:
    print(contest_2)
else:
    print(contest_1)

Fixed submission:
contest_1 = "ABC"
contest_2 = "ARC"

S = input()

if S == contest_1:
    print(contest_2)
else:
    print(contest_1)
Buggy python submission (verdict: Runtime Error):
A,B,C,D = map(int, input().split())

check = True
while True:
    if check:
        c -= b
        if c <= 0:
            print("Yes")
            break

else:
    a -= d
    if a<= 0:
        print("No")
        break

    check = not check


Fixed submission:
S, W = map(int, input().split())

if W >= S:
    print("unsafe")
else:
    print("safe")

Buggy python submission (verdict: Runtime Error):
S = int(input())
W = int(input())

if W >= S:
    print("unsafe")
else:
    print("safe")

Fixed submission:
S, W = map(int, input().split())

if W >= S:
    print("unsafe")
else:
    print("safe")
Buggy python submission (verdict: Runtime Error):
R = map(int, input())

cir = 2*R*3.1415

ptint(cir)

Fixed submission:
from math import pi

R = int(input())

print(2*pi*R)
Buggy python submission (verdict: Runtime Error):
S = int(input())
if "7" in S:
    print("yes")
else:
    print("no")

Fixed submission:
S = input()
if "7" in S:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
N = input()
if "7" in S:
    print("yes")
else:
    print("no")

Fixed submission:
S = input()
if "7" in S:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
S = input()
if 7 in S:
    print("yes")
else:
    print("no")

Fixed submission:
S = input()
if "7" in S:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
N = input()
if 7 in N:
    print("yes")
else:
    print("no")

Fixed submission:
S = input()
if "7" in S:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
S = input()
if s[2] == s[3] and s[4] == s[5]:
    print("Yes")
else:
    print("No")
    

Fixed submission:
S = input()
if S[2] == S[3] and S[4] == S[5]:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
S = input()
if s[2] == s[3] and s[4] == s[5]:
    print(Yes)
else:
    print(No)

Fixed submission:
S = input()
if S[2] == S[3] and S[4] == S[5]:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
S = input()
if s[3] == s[4] and s[5] == s[6]:
    print(Yes)
else:
    print(No)

Fixed submission:
S = input()
if S[2] == S[3] and S[4] == S[5]:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
N = int(input())
M = int(input())

n = N-1
m = M-1

Even = N*n
Odd = M*m

print((Even+Odd)/2)

Fixed submission:
N, M = map(int,input().split())

print(N*(N-1)//2+M*(M-1)//2)

Buggy python submission (verdict: Runtime Error):
N = input()
M = input()

n = N-1
m = M-1

if N == 1 and M == 1:
    print("0")
else:
    print((N*n+M*m)/2)

Fixed submission:
N, M = map(int,input().split())

print(N*(N-1)//2+M*(M-1)//2)

Buggy python submission (verdict: Runtime Error):
N = input()
M = input()

n = N-1
m = M-1

if N == 1 and M == 1:
    print("0")
else:
    print(N*n+M*m)

Fixed submission:
N, M = map(int,input().split())

print(N*(N-1)//2+M*(M-1)//2)
Buggy python submission (verdict: Runtime Error):
S,T = input().split()
A,B = map(int, input().split())
U = input()

if U = S: A-=1
else: B-=1
print(A,B)

Fixed submission:
S,T = input().split()
A,B = map(int, input().split())
U = input()

if U == S: A-=1
else: B-=1
print(A,B)

Buggy python submission (verdict: Runtime Error):
S,T = map(str, input().split())
A,B = map(int, input().split())
U = input()

if U = S:
    print({}""{},(A-1)+B)
else:
    print({}""{},A+(B-1))

Fixed submission:
S,T = input().split()
A,B = map(int, input().split())
U = input()

if U == S: A-=1
else: B-=1
print(A,B)
Buggy python submission (verdict: Runtime Error):
a = input()
print(a + a**2 + a**3)


Fixed submission:
a = int(input())
print(a + a**2 + a**3)
Buggy python submission (verdict: Runtime Error):
n = int(input())
dict = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for _ in range(n):
    s = input()
    if s in dict:
        dict[s] = dict[s] + 1
for k, l  in dict.items():
    print(k + ' x ' + str(l))



Fixed submission:
n = (input())
x, y = divmod(int(n), 1000)
if y == 0:
    print(0)
else:
    ans = (1000 * (x + 1)) - int(n)
    print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input())
dict = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for _ in range(n):
    s = input()
    if s in dict:
        dict[s] = dict[s] + 1
for k, l  in dict.items():
    print(k + ' x ' + str(l))

Fixed submission:
n = (input())
x, y = divmod(int(n), 1000)
if y == 0:
    print(0)
else:
    ans = (1000 * (x + 1)) - int(n)
    print(ans)
Buggy python submission (verdict: Runtime Error):
import numpy as np
S = input()
T = input()
s = []
t = []
i = 0
for i in range(len(S)):
    s.append(ord(S[i]))
    i += 1
i = 0
for i in range(len(T)):
    t.append(ord(T[i]))
    i += 1
    
s = np.array(s)
t = np.array(t)
print(len(S) - np.count_nonzero(s == t))

Fixed submission:
a = input()
print(str(int(a) + int(a)**2 + int(a)**3))
Buggy python submission (verdict: Runtime Error):
literal = ('a', 'b', 'c', 'd', 'e', 'f', 
           'g', 'h', 'i', 'j', 'k', 'l', 
           'm', 'n', 'o', 'p', 'q', 'r', 
           's', 't', 'u', 'v', 'w', 'x', 
           'y', 'z')
x = int(input())
str2 = ''
str3 = ''
q = x
if x < 27:
    str3 = literal[x-1]
while q > 26:
    q, mod = divmod(x, 26)
    str1 = ''
    if q > 26:
        x = q
        str1 = literal[mod - 1]
        str3 = str1 + str2
        str2 = str3
        str3 = ''
    else:
        str1 += literal[q - 1]
        str1 += literal[mod - 1]
        str3 = str1 + str2
print(str3)

Fixed submission:
a = input()
if a.islower():
    print('a')
else:
    print('A')

Buggy python submission (verdict: Runtime Error):
literal = ('a', 'b', 'c', 'd', 'e', 'f', 
           'g', 'h', 'i', 'j', 'k', 'l', 
           'm', 'n', 'o', 'p', 'q', 'r', 
           's', 't', 'u', 'v', 'w', 'x', 
           'y', 'z')
x = int(input())
str2 = ''
str3 = ''
q = x
while q > 26:
    q, mod = divmod(x, 26)
    str1 = ''
    if q > 26:
        x = q
        str1 = literal[mod - 1]
        str3 = str1 + str2
        str2 = str3
        str3 = ''
    else:
        str1 += literal[q - 1]
        str1 += literal[mod - 1]
        str3 = str1 + str2
print(str3)

Fixed submission:
a = input()
if a.islower():
    print('a')
else:
    print('A')

Buggy python submission (verdict: Runtime Error):
literal = ('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q',
           'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z')
x = int(input())
str2 = ''
str3 = ''
q = x
while q > 26:
    q, mod = divmod(x, 26)
    str1 = ''
    if q > 26:
        x = q
        str1 = literal[mod - 1]
        str3 = str1 + str2
        str2 = str3
        str3 = ''
    else:
        str1 += literal[q - 1]
        str1 += literal[mod - 1]
        str3 = str1 + str2
print(str3)

Fixed submission:
a = input()
if a.islower():
    print('a')
else:
    print('A')

Buggy python submission (verdict: Runtime Error):
literal = ('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q',
           'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z')
x = int(input())
str2 = ''
str3 = ''
q = x
while q > 26:
    q, mod = divmod(x, 26)
    str1 = ''
    if q > 26:
        x = q
        str1 = literal[mod - 1]
        str3 = str1 + str2
        str2 = str3
        str3 = ''
    else:
        str1 += literal[q - 1]
        str1 += literal[mod - 1]
        str3 = str1 + str2
print(str3)

Fixed submission:
a = input()
if a.islower():
    print('a')
else:
    print('A')
Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
s3 =[]

s = list(input())

s1 = s


s2= s1[K]

s3 = s2.lower()

s1[K] = s3

print('' .join(s1))


Fixed submission:
N, K = map(int, input().split())
s3 =[]

s = list(input())

s1 = s


s2= s1[K-1]

s3 = s2.lower()

s1[K-1] = s3

print('' .join(s1))
Buggy python submission (verdict: Runtime Error):
B = int(input())
C = int(input())
D = int(input())

if A <= B:
    densya = A

else:
    densya = B

if C <= D:
    bus = C

else:
    bus = D

untin = densya + bus

print(untin)

Fixed submission:
A = int(input())
B = int(input())
C = int(input())
D = int(input())

if A <= B:
    densya = A

else:
    densya = B

if C <= D:
    bus = C

else:
    bus = D

untin = densya + bus

print(untin)

Buggy python submission (verdict: Runtime Error):
B = int(input())
C = int(input())
D = int(input())

if A <= B:
    densya = A

else:
    densya = B

if C <= D:
    bus = C

else:
    bus = D

untin = densya + bus

print(untin)


Fixed submission:
A = int(input())
B = int(input())
C = int(input())
D = int(input())

if A <= B:
    densya = A

else:
    densya = B

if C <= D:
    bus = C

else:
    bus = D

untin = densya + bus

print(untin)
Buggy python submission (verdict: Runtime Error):
a, b, c = input().split()
    
print("A", b[1], "C")


Fixed submission:
a, b, c = input().split()
    
str = a[0] + b[0] + c[0]
print(str)
Buggy python submission (verdict: Runtime Error):
a, b, c = [int(3) for 3 in input().split() ]

mylist = [5, 7]

if ( a in mylist and b in mylist and c in mylist and a + b + c == 17 ):
    print("YES")
else:
    print("NO")

Fixed submission:
N = 3

a, b, c = [int(N) for N in input().split() ]

d = 17

mylist = [5, 7]

if ( a in mylist and b in mylist and c in mylist and a + b + c == 17 ):
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
A = input()
B = input()
c = len(B)
del B[c-1]
if A == B:
  print(Yes)
else:
  print(NO)


Fixed submission:
A = list(input())
B = list(input())
c = len(B)
del B[c-1]
if A == B:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
a, b, c, d = list(map(int, input().split()))
if a >= d:
  print(d)
elif a+b>=d:
  print(a)
elif:
  print(2*a+b-d)


Fixed submission:
a, b, c, d = list(map(int, input().split()))
if a >= d:
  print(d)
elif a+b>=d:
  print(a)
else:
  print(2*a+b-d)
Buggy python submission (verdict: Runtime Error):
N, M, X = list(map(int, input().split()))
A = [list(map(int, input().split())) for _ in range(N)]
kouho = []
for i in range(2**N):
  skill = [0]*M
  price = 0
  for j in range(N):
    if ((i>>j) & 1):
      skill = [x+y for (x, y) in zip(skill, A[j][1:])]
      price += A[j][0]
  flag = 1
  for k in skill:
    if k < X:
      flag = 0
  if flag:
    kouho.append(price)
print(min(kouho))
    


Fixed submission:
N, M, X = list(map(int, input().split()))
A = [list(map(int, input().split())) for _ in range(N)]
kouho = []
for i in range(2**N):
  skill = [0]*M
  price = 0
  for j in range(N):
    if ((i>>j) & 1):
      skill = [x+y for (x, y) in zip(skill, A[j][1:])]
      price += A[j][0]
  flag = 1
  for k in skill:
    if k < X:
      flag = 0
  if flag:
    kouho.append(price)
if len(kouho):
  print(min(kouho))
else:
  print(-1)
Buggy python submission (verdict: Runtime Error):
S = input()
if S == ABC:
  print("ARC")
else:
  print("ABC")

Fixed submission:
N = input()
if N == "ABC":
  print("ARC")
else:
  print("ABC")
Buggy python submission (verdict: Runtime Error):
X = int(input())
a = 0
b = 0
while a == 0 and b == 0:
    for i in range(1, 100000):
        A = i**5
        B = (A-X)**(1/5)
        if B.is_integer():
            a = int(A)
            b = int(B)
        break
print(f"{a} {b}")


Fixed submission:
X = int(input())
flag = 1
a = -1000
b = -1000
for i in range(-1000, 1000):
  for j in range(-1000, 1000):
    if i**5-j**5 ==X:
      a = i
      b = j
print(f"{a} {b}")

Buggy python submission (verdict: Runtime Error):
X = int(input())
for i in range(1, 1000):
    A = i**5
    B = (A-X)**(1/5)
    if B.is_integer():
      a = int(A)
      b = int(B)
print(f"{a} {b}")

Fixed submission:
X = int(input())
flag = 1
a = -1000
b = -1000
for i in range(-1000, 1000):
  for j in range(-1000, 1000):
    if i**5-j**5 ==X:
      a = i
      b = j
print(f"{a} {b}")
Buggy python submission (verdict: Runtime Error):
a = int(input())
b, c = list(map(int, input().split()))
if 
if int(c/a)>int(b/a):
  print("OK")
else:
  if b % a == 0:
    print("OK")
  else:
    print("NG")

Fixed submission:
a = int(input())
b, c = list(map(int, input().split()))
flag = 0
for i in range(b, c+1):
  if i % a == 0:
    flag = 1
if flag:
  print("OK")
else:
  print("NG")
Buggy python submission (verdict: Runtime Error):
X = int(input())
a = log(X/100, 1.01)
print(int(a)+1)

Fixed submission:
X = int(input())
y = 100
flag = 1
con = 0
while flag:
  y *= 1.01
  y = int(y)
  con += 1
  if y >= X:
    flag = 0
print(con)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = []
for _ in range(N):
  A.appen(input())
B = list(set(A))
print(len(B))

Fixed submission:
N = int(input())
A = []
for _ in range(N):
  A.append(input())
B = list(set(A))
print(len(B))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = []
ans = 0
for _ in range(N):
  B = input()
  if not B in A:
    ans += 1
    A.append(B)
print(ans)

Fixed submission:
N = int(input())
A = []
for _ in range(N):
  A.append(input())
B = list(set(A))
print(len(B))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = []
ans = 0
for _ in range(N):
  B = input()
  if not B in A:
    ans += 1
    A.append(B)
print(ans)

Fixed submission:
N = int(input())
A = []
for _ in range(N):
  A.append(input())
B = list(set(A))
print(len(B))

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = []
ans = 0
for _ in range(N):
  B = input()
  if not B in A:
    ans += 1
    A.append(input())
print(ans)


Fixed submission:
N = int(input())
A = []
for _ in range(N):
  A.append(input())
B = list(set(A))
print(len(B))