Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
a = [list(map(int, input().split())) for _ in range(m)]

a = [[a[i][0], a[i][1], a[i][2]*(-1)] for i in range(m)]
point = [0] + ['inf']*(n-1)

for j in range(n):
  for i in range(m):
    
    if point[a[i][1]-1] == 'inf' or point[a[i][1]-1] > point[a[i][0]-1] + a[i][2]:
      point[a[i][1]-1] = point[a[i][0]-1] + a[i][2]
    
      if j == (n-1) and a[i][1]-1 == (n-1):
        point.append('inf')
        
        
if 'inf' in point:
  print('inf')
else:
  print(-point[n-1])
  

Fixed submission:
import sys
INF=float('inf')
def Bellmanford(n,edges,r):
  d=[INF]*n
  d[r]=0    
  for i in range(n):
    for (u,v,c) in edges:
      if d[u]!=INF and d[u]+c<d[v]:
        d[v]=d[u]+c
        if i==n-1 and v==n-1:
          return 'inf'   
  return (-1)*d[n-1]

N,M=map(int, sys.stdin.readline().split())
Edges=[0]*M

for i in range(M):
  a,b,c=map(int, sys.stdin.readline().split())
  Edges[i]=(a-1,b-1,-c)
    
ans=Bellmanford(N,Edges,0)
print(ans)

Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
a = [list(map(int, input().split())) for _ in range(m)]

a = [[a[i][0], a[i][1], a[i][2]*(-1)] for i in range(m)]
point = [0] + ['inf']*(n-1)

for j in range(n):
  for i in range(m):
    
    if point[a[i][1]-1] == 'inf' or point[a[i][1]-1] > point[a[i][0]-1] + a[i][2]:
      point[a[i][1]-1] = point[a[i][0]-1] + a[i][2]
    
      if j == (n-1):
        point.append('inf')
        
        
if 'inf' in point:
  print('inf')
else:
  print(-point[n-1])
  

Fixed submission:
import sys
INF=float('inf')
def Bellmanford(n,edges,r):
  d=[INF]*n
  d[r]=0    
  for i in range(n):
    for (u,v,c) in edges:
      if d[u]!=INF and d[u]+c<d[v]:
        d[v]=d[u]+c
        if i==n-1 and v==n-1:
          return 'inf'   
  return (-1)*d[n-1]

N,M=map(int, sys.stdin.readline().split())
Edges=[0]*M

for i in range(M):
  a,b,c=map(int, sys.stdin.readline().split())
  Edges[i]=(a-1,b-1,-c)
    
ans=Bellmanford(N,Edges,0)
print(ans)

Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
a = [list(map(int, input().split())) for _ in range(m)]

a = [[a[i][0], a[i][1], a[i][2]*(-1)] for i in range(m)]
point = [0] + ['inf']*(n-1)

for j in range(n):
  for i in range(m):
    
    if point[a[i][1]-1] == 'inf' or point[a[i][1]-1] > point[a[i][0]-1] + a[i][2]:
      point[a[i][1]-1] = point[a[i][0]-1] + a[i][2]
    
      if j == (n-1):
        point.append('inf')
        
        
if 'inf' in point:
  print('inf')
else:
  print(-point[n-1])
  
  

Fixed submission:
import sys
INF=float('inf')
def Bellmanford(n,edges,r):
  d=[INF]*n
  d[r]=0    
  for i in range(n):
    for (u,v,c) in edges:
      if d[u]!=INF and d[u]+c<d[v]:
        d[v]=d[u]+c
        if i==n-1 and v==n-1:
          return 'inf'   
  return (-1)*d[n-1]

N,M=map(int, sys.stdin.readline().split())
Edges=[0]*M

for i in range(M):
  a,b,c=map(int, sys.stdin.readline().split())
  Edges[i]=(a-1,b-1,-c)
    
ans=Bellmanford(N,Edges,0)
print(ans)
Buggy python submission (verdict: Runtime Error):
import copy

n, c, k = map(int, input().split())
t = [int(i) for i in range(n)]

t.sort()
s = copy.copy(t)
ans = 0
for i in range(n):
  cnt = 1
  for j in range(i+1, n):
    if t[j] - t[i] <= k:
      cnt += 1
      t.remove(t[j])
      if cnt == c:
        ans += 1
        break
    else:
      ans += 1
      break
      
print(ans)

Fixed submission:
n, c, k = map(int, input().split())
T = [int(input()) for _ in range(n)]
T.sort()
cnt = 0
ans = 1
t = T[0]
for i in range(n):
    cnt += 1
    if cnt > c or T[i] > t + k:
        ans += 1
        cnt = 1
        t = T[i]
print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())

v = 1
for i in range(n):
  v = v*(i+1)
  
print(int(v%(1e9+7)))


Fixed submission:
n = int(input())

v = 1
for i in range(n):
  v = v*(i+1)
  if v >= 1e9+7:
    v = v%(int(1e9)+7)
  
print(v)
Buggy python submission (verdict: Time Limit Exceeded):
k, s = map(int, input().split())

cnt = 0
for i in range(k+1):
  for m in range(k+1):
    for n in range(k+1):
      if i + m + n == s:
        cnt += 1
        
        
print(cnt)

Fixed submission:
k, s = map(int, input().split())

cnt = 0
for x in range(k+1):
  for y in range(k+1):
    z = s - x - y
    if z >= 0 and z <= k:
      cnt += 1
        
        
print(cnt)
Buggy python submission (verdict: Runtime Error):
a, b, x = map(int, input().split())

cnt = 0
for i in range(1, 1e18):
  if a <= x*i and x*i <= b:
    cnt += 1
  elif b <= x*i:
    break
    
print(cnt)

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

print(b//x - (a-1)//x)

Buggy python submission (verdict: Time Limit Exceeded):
a, b, x = map(int, input().split())

cnt = 0
for i in range(a, b+1):
  if i%x == 0:
    cnt += 1
    
    
print(cnt)

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

print(b//x - (a-1)//x)
Buggy python submission (verdict: Runtime Error):
w, h, n = map(int, input().split())
a =[list(map(int, input().split())) for _ in range(n)]

g = [1*h]*w

for i in range(n):
  if a[i][2] == 1:
    g[:a[i][0]] = [0]*a[i][0]
  elif a[i][2] == 2:
    g[a[i][0]:] = [0]*a[i][0]
  elif a[i][2] == 3:
    g = [0 if g[j] == 0 else g[j]-a[i][1] for j in range(w)]
  elif a[i][2] == 4:
    g = [0 if g[j] == 0 else a[i][1] for j in range(w)]
    
  
print(sum(g))

Fixed submission:
w,h,n = map(int,input().split())
p = [0,w,0,h]
for i in range(n):
    x,y,a = map(int,input().split())
    if a == 1:
        p[0] = max(x,p[0])
    if a == 2:
        p[1] = min(x,p[1])
    if a == 3:
        p[2] = max(y,p[2])
    if a == 4:
        p[3] = min(y,p[3])
print(max(0,p[1]-p[0])*max(0,p[3]-p[2]))
Buggy python submission (verdict: Runtime Error):
import math
i = 1
z = 0
t = 0
n, d = map(int, input().split())
while i <= n:
    i += 1
    a, b = map(int, input().split())
    if math.sqrt(a**2 + b**2) <= d:
        t += 1

print(t)

Fixed submission:
a = int(input())
if a >= 30:
    print('Yes')
else:
    print('No')

Buggy python submission (verdict: Runtime Error):
import math
i = 1
z = 0
t = 0
n, d = map(int, input().split())
while i <= n:
    i += 1
    a, b = map(int, input().split())
    if math.sqrt(a**2 + b**2) <= d:
        t += 1

print(t)

Fixed submission:
a = int(input())
if a >= 30:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Time Limit Exceeded):
k = int(input())
i = 0
s = 0

if k % 2 == 0:
    print('-1')
    exit()

while True:
    i += 1
    s = 7 + 10*s
    if s % k == 0:
        break

print(i)

Fixed submission:
K = int(input())
 
num = 0
cnt = 0
ans = -1
 
for i in range(K):
    num = num*10 +7
    cnt += 1
    if num%K != 0:
        num = num%K
    else:
        ans = cnt
        break
    
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
k = int(input())
i = 0
s = 0

if k % 2 == 0:
    print('-1')
    exit()

while True:
    i += 1
    s = (7 + 10*s) % k
    if s == 0:
        break

print(i)

Fixed submission:
K = int(input())
 
num = 0
cnt = 0
ans = -1
 
for i in range(K):
    num = num*10 +7
    cnt += 1
    if num%K != 0:
        num = num%K
    else:
        ans = cnt
        break
    
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
k = int(input())
i = 0
s = 0

if k % 2 == 0:
    print('-1')
    exit()

while True:
    i += 1
    s = (7 + 10*s) % k
    if s == 0:
        print(i)
        exit()

Fixed submission:
K = int(input())
 
num = 0
cnt = 0
ans = -1
 
for i in range(K):
    num = num*10 +7
    cnt += 1
    if num%K != 0:
        num = num%K
    else:
        ans = cnt
        break
    
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
k = int(input())
i = 0
s = 0

if k % 2 == 0:
    print('-1')
    exit()

while True:
    i += 1
    s = (7 + 10*s) % k
    if s == 0:
        print(i)
        exit()

Fixed submission:
K = int(input())
 
num = 0
cnt = 0
ans = -1
 
for i in range(K):
    num = num*10 +7
    cnt += 1
    if num%K != 0:
        num = num%K
    else:
        ans = cnt
        break
    
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
k = int(input())
i = 0
s = 0

while True:
    i += 1
    s = (7 + 10*s) % k
    if k % 2 == 0:
        print('-1')
        break
    elif s == 0:
        print(i)
        break

Fixed submission:
K = int(input())
 
num = 0
cnt = 0
ans = -1
 
for i in range(K):
    num = num*10 +7
    cnt += 1
    if num%K != 0:
        num = num%K
    else:
        ans = cnt
        break
    
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
from operator import mod
d = 0
e = -1
i = 1
a = int(input())
while True:
    d = 7 + 10*d
    if mod(a, 2) == 0:
        print(e)
        break
    elif mod(d, a) == 0:
        print(i)
        break
    i += 1

Fixed submission:
K = int(input())
 
num = 0
cnt = 0
ans = -1
 
for i in range(K):
    num = num*10 +7
    cnt += 1
    if num%K != 0:
        num = num%K
    else:
        ans = cnt
        break
    
print(ans)
Buggy python submission (verdict: Runtime Error):
m, n = map(int, input().split())
p = list(map(int, input().split()))

if n == 0:
    print(m)
    exit()
else:
    pp = list(range(1, max(p)+1))
    ppp = list(filter(lambda x: x not in p, pp))
    pppp = list(map(lambda x: abs(x-m), ppp))
    print(ppp[pppp.index(min(pppp))])

Fixed submission:
m, n = map(int, input().split())
p = list(map(int, input().split()))
a=0

while True:
    if m-a not in p:
        print(m-a)
        break
    elif m+a not in p:
        print(m+a)
        break
    a+=1
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))
ans = 1

if min(A) == 0:
    ans = 0
    print(ans)
    exit()
else:
    for i in A:
        ans *= i
    if ans > 10**18:
        ans = -1
        print(ans)
        exit()

print(ans)

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

if min(A) == 0:
    print(0)
    exit()

for i in A:
    ans *= i
    if ans > 10**18:
        print(-1)
        exit()

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))
ans = 1

if min(A) == 0:
    ans = 0
else:
    for i in A:
        ans *= i
    if ans > 10**18:
        ans = -1

print(ans)

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

if min(A) == 0:
    print(0)
    exit()

for i in A:
    ans *= i
    if ans > 10**18:
        print(-1)
        exit()

print(ans)
Buggy python submission (verdict: Runtime Error):
i = 0
k_n = []
k_n_all = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

p_price, k_number = map(int, input().split())
k_n = map(int, input().split())
result_number = list(set(k_n_all) - set(k_n))
result_price = p_price

while True:
    x = 0
    y = 0
    z = list(map(int, str(result_price)))
    while x < len(z):
        if z[x] in result_number:
            y += 0
        else:
            y += 1
        x += 1

    if y == 0:
        print(result_price)
        break
    else:
        result_price += 1

Fixed submission:
n_5 = 0
n_7 = 0

a = map(int, input().split())
for i in a:
    if i == 5:
        n_5 += 1
    elif i == 7:
        n_7 += 1

if n_5 == 2 and n_7 == 1:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
i = 0
k_n = []
k_n_all = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

p_price, k_number = map(int, input().split())
k_n = map(int, input().split())
result_number = list(set(k_n_all) - set(k_n))
result_price = p_price

while True:
    x = 0
    y = 0
    z = list(map(int, str(result_price)))
    while x < len(z):
        if z[x] in result_number:
            y += 0
        else:
            y += 1
        x += 1

    if y == 0:
        print(result_price)
        break
    else:
        result_price += 1

Fixed submission:
n_5 = 0
n_7 = 0

a = map(int, input().split())
for i in a:
    if i == 5:
        n_5 += 1
    elif i == 7:
        n_7 += 1

if n_5 == 2 and n_7 == 1:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
str_list = []
n_number,l_length = map(int,input().split())
w_1=input()
str_list.append(w_1)
w_2=input()
str_list.append(w_2)
w_3=input()
str_list.append(w_3)


str_list.sort()
print(''.join(str_list))

Fixed submission:
str_list = []
i = 1
n_number, l_length = map(int, input().split())
while i <= n_number:
    w_1 = input()
    str_list.append(w_1)
    i += 1


str_list.sort()
print(''.join(str_list))
Buggy python submission (verdict: Runtime Error):
import math
n = int(input())
ans = math.factorial(10) / math.factorial(10 - (n-2))
print(ans % (10**9 + 7))

Fixed submission:
n = int(input())
ans = 10**n - 9**n - 9**n + 8**n
print(ans % (10**9 + 7))

Buggy python submission (verdict: Runtime Error):
import math
n = int(input())
ans = math.factorial(10) // math.factorial(10 - (n-2))
print(ans % (10**9 + 7))

Fixed submission:
n = int(input())
ans = 10**n - 9**n - 9**n + 8**n
print(ans % (10**9 + 7))

Buggy python submission (verdict: Runtime Error):
n = int(input())
ans = math.factorial(10) // math.factorial(10 - (n-2))
print(ans % (10**9 + 7))

Fixed submission:
n = int(input())
ans = 10**n - 9**n - 9**n + 8**n
print(ans % (10**9 + 7))
Buggy python submission (verdict: Runtime Error):
strList = list(input())
intList = [int(s) for s in strList]
if sum(intList)%9 == 0:
  print(Yes)
else:
  print(No)

Fixed submission:
strList = list(input())
intList = [int(s) for s in strList]
if sum(intList)%9 == 0:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
strList = input()
intList = [int(s) for s in strList]
if sum(intList)%9 == 0:
  print(Yes)
else:
  print(No)


Fixed submission:
strList = list(input())
intList = [int(s) for s in strList]
if sum(intList)%9 == 0:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
strList = input()
intList = [int(s) for s in strList]
sum = sum(intList)
if sum%9 == 0:
  print(Yes)
else:
  print(No)

Fixed submission:
strList = list(input())
intList = [int(s) for s in strList]
if sum(intList)%9 == 0:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
n = int(input())
if n mod 2 == 0 or n < 10:
    print(0)
else:
    k = n // 5
    print(k * (k + 1) / 2)

Fixed submission:
n = int(input())
if n % 2 == 1:
    print(0)
else:
    print(sum(n // (2 * 5 ** d) for d in range(1, 25 + 1)))
Buggy python submission (verdict: Runtime Error):
s = raw_input()
print (s.count("+") - s.count("-"))


Fixed submission:
s = raw_input()
print (s.count("+") - s.count("-"))
Buggy python submission (verdict: Runtime Error):
N = int(input())
count = 0
for i in range(N):
  a,b = map(int,input().sprit())
  if a == b:
    count+=1
    if count = 3:
      print("Yes")
      break
  else:
    count = 0
print("No")

Fixed submission:
N = int(input())
count = 0
for i in range(N):
  a,b = map(int,input().split())
  if a == b:
    count+=1
    if count == 3:
      print("Yes")
      break
  else:
    count = 0
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
N,X,M = map(int,input().split())

d = {X:0}
l = [X]

for i in range(1,N):
  l+=[(l[i-1]**2)%M]
  if l[i] in d:
    dl = l[d[l[i]]+1:]
    print(dl)
    l += dl*((N-i-1)//len(dl))
    if (N-i-1)%len(dl) != 0:
      l += dl[0:(N-i-1)%len(dl)]
    break
  d[l[i]] = i
print(l)
print(sum(l))

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

d = {X:0}
l = [X]
s = X

for i in range(1,N):
  l+=[(l[i-1]**2)%M]
  s += l[i]
  if l[i] in d:
    dl = l[d[l[i]]+1:]
    s += sum(dl)*((N-i-1)//len(dl))
    if (N-i-1)%len(dl) != 0:
      s += sum(dl[0:(N-i-1)%len(dl)])
    break
  d[l[i]] = i
print(s)
Buggy python submission (verdict: Runtime Error):
N,Q = (map(int,input().split()))
for a in range(N,-1,-1):
    A = a*10000
    if A > Q:
        continue
    if (a==N)and(A == Q):
        print("{0} 0 0".format(a))
        exit()
    for b in range(N-a,-1,-1):
        B = A+b*5000
        if B > Q:
            continue
        if (a+b=N)and(B == Q):
            print("{0} {1} 0".format(a,b))
            exit()
        if ((Q-B)%1000==0)and((Q-B)/1000==(N-a-b)):
            print("{0} {1} {2}".format(a,b,int((Q-B)/1000)))
            exit()
print("-1 -1 -1")

Fixed submission:
N,Q = (map(int,input().split()))
for a in range(N,-1,-1):
    A = a*10000
    if A > Q:
        continue
    if (a==N)and(A == Q):
        print("{0} 0 0".format(a))
        exit()
    for b in range(N-a,-1,-1):
        B = A+b*5000
        if B > Q:
            continue
        if (a+b==N)and(B == Q):
            print("{0} {1} 0".format(a,b))
            exit()
        if ((Q-B)%1000==0)and((Q-B)/1000==(N-a-b)):
            print("{0} {1} {2}".format(a,b,int((Q-B)/1000)))
            exit()
print("-1 -1 -1")
Buggy python submission (verdict: Time Limit Exceeded):
import sys,math

_primes = {1:False,2:True}
like2017 = {}

def isPrime(num):
    if num not in _primes:
        for i in range(2,max(2,math.floor(math.sqrt(num))+1)):
            if num%i == 0:
                _primes[num] = False
                break
        else:
            _primes[num] = True
    return _primes[num]

def isLike(num):
    if num not in like2017:
        like2017[num] = True if (isPrime(num) and isPrime((num+1)/2)) else False
    return like2017[num]

Q = int(input())
for i in range(Q):
    S,G = list(map(int,input().split()))
    print(sum(isLike(x) for x in range(S,G+1,2)))

Fixed submission:
prime = {1:False}
for i in range(2,100001):
    if i not in prime:
        prime[i] = True
        for j in range(i*2,100001,i):
            prime[j] = False

like = {0:0}
for i in range(1,100001):
    like[i] = like[i-1] + int((i%2==1) and prime[i] and prime[int((i+1)/2)])

Q = int(input())
for i in range(Q):
    LR = list(map(int,input().split()))
    print("%d"%(like[LR[1]]-like[LR[0]-1]))
Buggy python submission (verdict: Runtime Error):
k = int(input())

if k = 1:
    print("ACL")
if k = 2:
    print("ACLACL")
if k = 3:
    print("ACLACLACL")
if k = 4:
    print("ACLACLACLACL")
if k = 5:
    print("ACLACLACLACLACL")

Fixed submission:
k = int(input())

if k == 1:
    print("ACL")
if k == 2:
    print("ACLACL")
if k == 3:
    print("ACLACLACL")
if k == 4:
    print("ACLACLACLACL")
if k == 5:
    print("ACLACLACLACLACL")
Buggy python submission (verdict: Runtime Error):
n,k=int(input())

count=0

while n//k>0:
  n//k
  count+=1
  
  

Fixed submission:
n,k=map(int,input().split())
        
count=1
 
while n//k>0:
  n=n//k
  count+=1
  
print(count)
Buggy python submission (verdict: Runtime Error):
a=list(map(int,input().split()))

a.sort()

s=0
i=0

if sum(a)<=x:
    print(n)
    exit()
elif min(a)>x:
    print(0)
    exit()
else:
    while s<x:
        s+=a[i]
        i+=1

print(i-1)

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

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

a.sort()

count=0
 
if x<a[0]:
    print(0)
    exit()


for i in range(n):
    if x>=a[i]:
        x-=a[i]
        count+=1
    else:
        print(count)
        exit()

if x>0:
    print(count-1)
else:
    print(count)

Buggy python submission (verdict: Runtime Error):
a=list(map(int,input().split()))

a.sort()

s=0
i=0

if sum(a)<=x:
    print(n)
    exit()
elif min(a)>x:
    print(0)
    exit()
else:
    while s<x:
        s+=a[i]
        i+=1

print(s)
print(i-1)

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

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

a.sort()

count=0
 
if x<a[0]:
    print(0)
    exit()


for i in range(n):
    if x>=a[i]:
        x-=a[i]
        count+=1
    else:
        print(count)
        exit()

if x>0:
    print(count-1)
else:
    print(count)
Buggy python submission (verdict: Runtime Error):
A,B,C,X,Y = map(int,input().split())
ans=0


if A+B > c*2:
    Z = min(X,Y)
    ans += 2*C*Z
    X -= Z
    Y -= Z
a = min(A,2*C)
b = min(B,2*C)

ans += a*X
ans += b*Y

print(ans)


Fixed submission:
A,B,C,X,Y = map(int,input().split())
ans=0


if A+B > C*2:
    Z = min(X,Y)
    ans += 2*C*Z
    X -= Z
    Y -= Z
a = min(A,2*C)
b = min(B,2*C)

ans += a*X
ans += b*Y

print(ans)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

a,b=map(int,input().split())
 
if a*b%2=0:
	print('Even')
else:
  	print('Odd')

Fixed submission:
# -*- coding: utf-8 -*-
 
a,b=map(int,input().split())
 
if (a*b)%2==0:
	print('Even')
else:
  	print('Odd')

Buggy python submission (verdict: Runtime Error):
# -*- coding: <encoding name> -*-
a,b=map(int,input().split())

if a*b%2=0:
	print('Even')
else:
  	print('Odd')

Fixed submission:
# -*- coding: utf-8 -*-
 
a,b=map(int,input().split())
 
if (a*b)%2==0:
	print('Even')
else:
  	print('Odd')
Buggy python submission (verdict: Runtime Error):
N=int(input())
d = [int(input()) for i in range(n)]

print(len(set(d)))

Fixed submission:
N=int(input())
d = [int(input()) for i in range(N)]

print(len(set(d)))
Buggy python submission (verdict: Runtime Error):
n,a,b=map(int,input().split())

sum=0

for i in range(n+1):
    if a<=sum(map(int,str(i)))<=b:
        count+=i

print(sum)

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

count=0

for i in range(n+1):
    if a<=sum(map(int,str(i)))<=b:
        count+=i

print(count)
Buggy python submission (verdict: Runtime Error):
s=list(input())
t=list(input())

s.sort()
t.sort()
t.reverse()

for i in range(len(s)):
  S=s[i]
for i in range(len(t)):
  T=t[i]
if S<=T:
  print('No')
elif S==T:
  print('No')
else:
  print('Yes')

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

if a%2==0 and b%2==0:
  print(int((a+b)/2))
elif a%2==1 and b%2==1:
  print(int((a+b)/2))
elif a%2==0 and b%2==1:
  print(int((a+b+1)/2))
else:
  print(int((a+b+1)/2))
Buggy python submission (verdict: Runtime Error):
s=list(input())

for i in range(len(s)):
  if i%2==1:
    s.pop(i)
  
ss=''.join(map(str,s))

print(ss)

Fixed submission:
s=list(input())

for i in range(len(s)):
  if i%2==1:
    s[i]=''
  
ss=''.join(map(str,s))

print(ss)

Buggy python submission (verdict: Runtime Error):
s=list(input())


for i in range(len(s)//2):
  s.pop(2*i-1)
  
ss=''.join(map(str,s))

print(ss)

Fixed submission:
s=list(input())

for i in range(len(s)):
  if i%2==1:
    s[i]=''
  
ss=''.join(map(str,s))

print(ss)

Buggy python submission (verdict: Runtime Error):
s=list(input())

for i in range(len(s)):
  s.pop(2*i-1)
  
ss=''.join(map(str,s))

print(ss)

Fixed submission:
s=list(input())

for i in range(len(s)):
  if i%2==1:
    s[i]=''
  
ss=''.join(map(str,s))

print(ss)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))

M = max(a)

def counter(x):
    cnt = 0
    for i in range(n):
        if a[i] == x or a[i] - 1 == x or a[i] + 1 == x:
            cnt += 1
    return cnt

cnt_list =[]
for j in range(M):
    cnt_list.append(counter(j))

print(max(cnt_list))

Fixed submission:
n = int(input())
a = list(map(int,input().split()))

ans = 0

cnt = [0]*100001

for i in a:
    cnt[i] += 1

for i in range(len(cnt)-2):
    ans = max(ans,cnt[i]+cnt[i+1]+cnt[i+2])

print(ans)
Buggy python submission (verdict: Runtime Error):
4 3
1 2
2 3
1 4


Fixed submission:
N,M=map(int,input().split())
cnt=[0 for i in range(N)]


for i in range(M):
    a,b=map(int,input().split())
    cnt[a-1]+=1
    cnt[b-1]+=1

for i in range(N):
    print(cnt[i])