Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p03239 (python)

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

ct = [[int(i) for i in input().split()] for _ in range(n)]

x=[]
for i in range(n):
  if ct[i][1] <= t:
    x.append(ct[i][0])
    
    
x.sort()

if len(x) != 0:
  print(x[0])
else:
  print("TLE")

Buggy submission (verdict: Runtime Error):
n,t = map(int,input().split())

ct = [[int(i) for i in input().split()] for _ in range(n)]

x=[]
for i in range(n):
  if ct[i][1] <= t:
    x.append(ct[i][0])
    
    
x.sort()

print(x[0])

if not x:
  print("TLE")

Buggy submission (verdict: Runtime Error):
n,t = map(int,input().split())

ct = [[int(i) for i in input().split()] for _ in range(n)]

x=[]
for i in range(n):
  if ct[i][1] <= t:
    x.append(ct[i][0])
    
    
x.sort()

print(x[0])

if len(x) == 0:
  print("TLE")

Buggy submission (verdict: Runtime Error):
n,t = map(int,input().split())

ct = [[int(i) for i in input().split()] for _ in range(n)]

x=[]
for i in range(n):
  if ct[i][1] <= t:
    x.append(ct[i][0])
    
    
x.sort()

print(x[0])

Buggy submission (verdict: Runtime Error):
n,t = map(int,input().split())

ct = [[int(i) for i in input().split()] for _ in range(n)]

x=[]
for i in range(n):
  if ct[i][1] <= t:
    x.append(ct[i][0])
    
    
x.sotr()

print(x[0])
Problem p03243 (python)

Fixed submission:
n=int(input())
for i in range(10):
  if 111*i<n<=111*(i+1):
    print(111*(i+1))

Buggy submission (verdict: Runtime Error):
n = input()

x = False

while x = False:
  for i in range(1,len(n)):
    if n[i-1] == n[i]:
      x =True
    else:
      x = False
  if x = True:
    print(n)
    break
  else:
    n = int(n) + 1
Problem p03244 (python)

Fixed submission:
from collections import Counter
n = int(input())
v = list(map(int,input().split()))
a = Counter(v[0::2]).most_common()
b = Counter(v[1::2]).most_common()
a.append([0,0])
b.append([0,0])

if a[0][0] != b[0][0]:
  print(n-(a[0][1]+b[0][1]))
else:
  print(min(n-(a[1][1]+b[0][1]),n-(a[0][1]+b[1][1])))

Buggy submission (verdict: Runtime Error):
from collections import Counter
n = int(input())
v = list(map(int,input().split()))
a = Counter(v[0::2]).most_common()
b = Counter(v[1::2]).most_common()
a.append([0,0])
b.append([0,0])

if a[0][0] != b[0][0]:
  print(n-(a[0][1]+b[0][1]))
else:
  print(min(n-(a[1][1]+b[0][1]),n-(a[0][1]+b[1][1]))
Problem p03251 (python)

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

x = [int(i) for i in input().split()]
y = [int(i) for i in input().split()]

c=0
for i in range(X+1,Y+1):
  c =0
  if (i >X and i <=Y) :
    c += 1
  if max(x) < i :
    c += 1
  if min(y) >= i :
    c += 1
  
  if c == 3:
   
    print("No War")
    exit()
  else:
    continue
    
    
print("War")

Buggy submission (verdict: Runtime Error):
N,M,X,Y = map(int,input().split())

x = [int(i) for i in input().split()]
y = [int(i) for i in input().split()]

c=0
for i in range(X,Y+1):
  c =0
  if (i >=X and i <=Y) :
    c += 1
  if max(x) < i :
    c + =1
  if min(y) < i :
    c += 1
  
  if c == 3:
    print("No War")
    exit()
  else:
    continue
    
    
print("War")
Problem p03274 (python)

Fixed submission:
N,K = map(int,input().split())
x = [int(i) for i in input().split()]
a=[]
for i in range(N-K+1):
  left =x[i]
  right =x[i+K-1]
  p1 = abs(left) + abs(right-left)
  p2 = abs(right) + abs(right-left)
  p = min(p1,p2)
  a.append(p)
  
  
print(min(a))

Buggy submission (verdict: Runtime Error):
N,K = map(int,input().split())
x = [int(i) for i in input().split()]
ans = 10**5
for i in range(N-K+1):
  left =x[i]
  right =x[i+3]
  p1 = abs(left) + abs(right-left)
  p2 = abs(right) + abs(right-left)
  p = min(p1,p2)
  ans = min(ans,p)
  
  
print(ans)
Problem p03289 (python)

Fixed submission:
S = input()


ans = 0
num = 0
cnum = 0

if S[0] == "A":
  ans += 1

for i in range(2,len(S)-1):
  if S[i] == "C":
    cnum += 1
    
if cnum == 1:
  ans +=1

for j in range(len(S)):
  if S[j].islower() == True:
    num += 1

    
if num == len(S)-2:
  ans +=1
  
  
  

if ans ==3:
  print("AC")
else:
  print("WA")

Buggy submission (verdict: Runtime Error):
S = input()


ans = 0
num = 0
cnum = 0
if S[0] == "A":
  ans += 1

for i in range(2,len(S)-1):
  if S[i] == "C":
    cnum += 1
    
if cnum == 1:
  ans +=1

for j in range(len(S)):
  if j.islower() == True:
    num += 1

    
if num == len(S)-2:
  ans +=1
  
  
  

if ans ==3:
  print("AC")
else:
  print("WA")
Problem p03308 (python)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
dist = []
for i in range(n):
    for j in range(n):
        if i >= j:
            continue
        dist.append(abs(a[i]-a[j]))
print(max(dist))

Buggy submission (verdict: Runtime Error):
N = int(input())

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

i=0

max = 0
min = 0
for i in range(n):
  if a[i] >= max:
    max = a[i]
  elif a[i] <= min:
    min = a[i]
  else:
    continue
    
print (max - min)

Buggy submission (verdict: Runtime Error):
N = int(input())

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

i=0

max = 0
min = 0
for i in range(n):
  if a[i] >= max:
    max = a[i]
  elif a[i] <= min:
    min = a[i]
  else
    continue
    
print (max - min)

Buggy submission (verdict: Runtime Error):
N = int(input())

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

i=0

c=0
max = 0
min = 0
for i in range(n):
  if a[i] >= max:
    max = a[i]
  elif a[i] <= min:
    min = a[i]
  else
    i +=1
    
print (max - min)

Buggy submission (verdict: Runtime Error):
N = int(input())

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

i=0

c=0
max = 0
min = 0
for i in a[i]:
  if a[i] >= max:
    max = a[i]
  elif a[i] <= min:
    min = a[i]
  else
    i +=1
    
print (max - min)
Problem p03316 (python)

Fixed submission:
n = input()


sum = 0

for i in range(len(n)):
  sum += int(n[i])
  
if int(n) % sum ==0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n = int(input())


sum = 0

for i in range(len(n)):
  sum += n[i]
  
if n % sum ==0:
  print("Yes")
else:
  print("No")
Problem p03324 (python)

Fixed submission:
d, n = map(int, input().split())
if n != 100:
    print(n*100**d)
else:
    print((n+1)*100**d)

Buggy submission (verdict: Runtime Error):
d,n = map(int,input().split())

a=[]
k = 1
while len(a) == n:
  if (k % d < 100):
    a.append(k)
    
    
print(a[-1])
Problem p03331 (python)

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

ans = sum(list)
if ans ==1:
  print(10)
else:
  print(ans)

Buggy submission (verdict: Runtime Error):
for i in range(100000):
  g = N -i
  a=sum(map(int,list(str(g))))
  b=sum(map(int,list(str(i))))
  ans =  a + b
  if ans == 0:
    num = ans
  elif num >= ans:
    num = ans
  else:
    continue
Problem p03369 (python)

Fixed submission:
print( 700 + 100*input().count("o"))

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

num = 0
for i in range(len(s)):
  if s[i] == o:
    num +=100
  else:
    continue



print(700 + num)

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

num = 0
for i in range(len(s)):
  if s[i] == o:
    num +=100



print(700 + num)

Buggy submission (verdict: Runtime Error):
print( 700 + 100*input().count("o")

Buggy submission (verdict: Runtime Error):
a,b,c = input().split()

S = a+b+c

j=0
if S[0] ==o:
  j += 100
if S[1] ==o:
  j += 100
if S[2] ==o:
  j += 100
  
print(700 + int(j))
Problem p03386 (python)

Fixed submission:
A,B,K = map(int,input().split())
            
ans=[]
            
for i in range(K):
  if A+i <=B:
    ans.append(A+i)
  if B-i >= A:
    ans.append(B-i)
            
            
ans = sorted(list(set(ans)))
print(*ans,sep="\n")

Buggy submission (verdict: Runtime Error):
A,B,K = map(int,input().split()
            
ans = []
            
for i in range(K):
  if A+i <=B:
    ans.append(A+i)
  if B-i >= A:
    ans.append(B-i)
            
            
ans = sorted(lis(set(ans)))
print(*ans,sep="\n")

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

x =list(range(a,b+1))
ans =[]

if  len(x) >=k:
  print(sorted("\n".join(map(str,x))))
  exit()

else:
  for i in range(k):
    if len(x) > i:
      if not(x[i] in ans):
        ans.append(x[i])
      if not(x[-(1+i)] in ans):
        ans.append(x[-(1+i)])
  
  ans.sort()

s = "\n".join(map(str,ans))
print(s)

Buggy submission (verdict: Runtime Error):
ans =[]

if  len(x) >=k:
  print("\n".join(map(str,x)))
  exit()

else:
  for i in range(k):
    if len(x) > i:
      if not(x[i] in ans):
        ans.append(x[i])
      if not(x[-(1+i)] in ans):
        ans.append(x[-(1+i)])
  
  ans.sort()

s = "\n".join(map(str,ans))
print(s)

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

x =list(range(a,b+1))
ans =[]

if  len(x) >=i:
  print("\n".join(map(str,x)))
  exit()

else:
  for i in range(k):
    if len(x) > i:
      if not(x[i] in ans):
        ans.append(x[i])
      if not(x[-(1+i)] in ans):
        ans.append(x[-(1+i)])
  
  ans.sort()

s = "\n".join(map(str,ans))
print(s)

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

x =list(range(a,b+1))
ans =[]

for i in range(k):
  if len(x) >= i:
    if not(x[i] in ans):
      ans.append(x[i])
    if not(x[-(1+i)] in ans):
      ans.append(x[-(1+i)])
  
ans.sort()

s = "\n".join(map(str,ans))
print(s)

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

x =list(range(a,b+1))
ans =[]

for i in range(k):
  if len(x) > i:
    if not(x[i] in ans):
      ans.append(x[i])
    if not(x[-(1+i)] in ans):
      ans.append(x[-(1+i)])
  
ans.sort()



s = "\n".join(map(str,ans))
print(s)

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

x =list(range(a,b+1))
ans =[]

for i in range(k):
  if len(x) > i:
    ans.append(x[i])
    ans.append(x[-(1+i)])
  
  
ans.sort()
ans2 =set(ans)


s = "\n".join(map(str,ans2))
print(s)

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

x =list(range(a,b+1))
ans =[]

for i in range(k):
  if len(x) > i:
    ans.append(x[i])
    ans.append(x[-(1+i)])
  
  
ans.sort()
ans2 =set(ans)


print(ans2)

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

x =list(range(a,b+1))
ans =[]

for i in range(k):
  ans.append(x[i])
  ans.append(x[-(1+i)])
  
  
ans.sort()


print(ans)

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

x =[a:b+1]
ans =[]

for i in range(k):
  ans.append(x[i])
  ans.append(x[-(1+i)])
  
  
ans.sort()

print("".joint(ans))
Problem p03408 (python)

Fixed submission:
n = int(input())
s = [input() for i in range(n)]
m = int(input())
t = [input() for i in range(m)]
ans = 0

for i in set(s):
  num = s.count(i) - t.count(i)
  if num > ans :
    ans = num
    
    
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = [input() for i in range(n)]
m = int(input())
t = [input() for i in range(n)]
ans = 0

for i in set(s):
  num = s.count(i) - t.count(i)
  if num > ans :
    ans = num
    
    
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = [input() for i in range(n)]
m = int(input())
t = [input() for i in range(n)]
ans = 0

for i in set(s):
  num = s.count(i) - t.count(i)
  if num > ans :
    ans = num
    
    
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = [input() for i in range(n)]
m = int(input())
t = [input() for i in range(n)]
ans = 0

for i in set(s):
  num = s.count(i) - t.count(s)
  if num > ans :
    ans = num
    
    
print(ans)
Problem p03416 (python)

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


ans = 0
for i in range(A,B+1):
  num = list(map(int,list(str(i))))
  if num[0]==num[4] and num[1]==num[3]:
    ans += 1


    
print(ans)

Buggy submission (verdict: Runtime Error):
A,B = map(int,input().split())


ans = 0
for i in range(A,B+1):
  num = map(int,list(str(i)))
  if num[1]==num[5] and num[2]==num[4]:
    ans += 1
Problem p03424 (python)

Fixed submission:
n = int(input())

s = list(input().split())

if len(set(s)) <= 3:
  print("Three")
  
else: 
  print("Four")

Buggy submission (verdict: Runtime Error):
n = int(input())

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

if set(s) <= 3:
  print("Three")
  
else: 
  print("Four")
Problem p03455 (python)

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

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

Buggy submission (verdict: Runtime Error):
def xx (a,b)
  
a = input()
b = input()

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


def(1,21)

Buggy submission (verdict: Runtime Error):


def xx (a,b)
  
a = input()
b = input()

  if a*b %2 == 0:
    print("Even")
  else
    print("Odd")
Problem p03456 (python)

Fixed submission:

a,b = input().split()

n = int(a+b)

for i in range(1000):
  if i**2 == n:
    print("Yes")
    exit()

print("No")

Buggy submission (verdict: Runtime Error):
import math
a,b = input().split()

n = int(a+b)

for i in range(1000):
  if i**2 = n:
    print("Yes")
    exit()

print("No")

Buggy submission (verdict: Runtime Error):

a,b = input().split()

n = int(a+b)

for i in range(1000):
  if i**2 = n:
    print("Yes")
    exit()

print("No")
Problem p03486 (python)

Fixed submission:
s = ''.join(sorted(list(input())))
t = ''.join(sorted(list(input()), reverse=True))

if s < t:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
s = ''.join(sorted(list(input())))
t = ''.join(sorte(list(input()),reverse = True))

is s < t:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
s = "".join(sorted(list(input())))
t = "".join(sorte(list(input()),reverse = True))

is s < t:
  print("Yes")
else:
  print("No")
Problem p03487 (python)

Fixed submission:
from collections import Counter
n = int(input())
a = Counter(input().split())
ans = 0
for i,j in a.items():
  i = int(i)
  if i>j:
    ans +=j
  elif i <j:
    ans += j-i
print(ans)

Buggy submission (verdict: Runtime Error):
from collections import Counter
n = int(input())
a = Counter(input().split())
ans += 0
for i in range(len(a)):
  if a.keys()[i][1] < int(a.keys()[i][0]):
    ans += a.keys()[i][0]
    
  elif a.keys()[i][1] >int(a.keys()[i][0]):
    ans +=(int(a.keys()[i][0])-a.keys()[i][1])
    
print(ans)
Problem p03493 (python)

Fixed submission:
s = input()
 
x = 0
 
 
for i in range(len(s)):
  if s[i] == "1":
    x += 1
  
print(x)

Buggy submission (verdict: Runtime Error):
s = input()
a = []
for i in range(len(s)):
  a.append(s[i])
  

count = 0

for i in [0,3]:
  if a[i] == "1":
    count +=1
    
  
print(count)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = [int(i) for i in input().split()]
c = 0
i = 0
 
while a[i]%2 == 0:
  if a[i]%2 ==0:
    a[i]//=2
  if i==n-1:
    c+=1
    i = 0
  i+=1
print(c)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = [int(i) for i in input().split()]
count = 0
i = 0
 
while a[i]%2 == 0:
  if a[i]%2 ==0:
    a[i]//=2
  if i == n-1:
    count +=1
    i = 0
  i += 1
print(count)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = [int(i) for i in input().split()]
c = 0
i = 0
 
while a[i]%2 == 0:
  if a[i]%2 ==0:
    a[i]//=2
  if i == n-1:
    c +=1
    i = 0
  i += 1
print(c)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = [int(i) for i in input().split()]
c = 0
i = 0

while a[i]%2 == 0:
  if a[i]%2 ==0:
    a[i]//=2
  if i == n-1:
    count +=1
    i = 0
  i += 1
print(count)
Problem p03495 (python)

Fixed submission:
n,k = map(int, input().split())
A = [int(x) for x in input().split()]
d = {}
for a in A:
  if a in d:
    d[a] +=1
  else:
    d[a] =1
    
d =sorted(d.values())
if len(d) > k:
  ans = 0
  for i in range(len(d)-k):
    ans += d[i]
  print(ans)
else:
  print(0)

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
a = [input().split() for i in range(n)]

d = {}
for i in a:
  if i in d:
    d[a] += 1
  else:
    d[a] = 1
    
    
d = sorted(d,values())
if len(d) > k:
  ans = 0
  for i in range(len(d)-k):
    ans += d[i]
  print(ans)
else:
  print(0)

Buggy submission (verdict: Runtime Error):
n,k = map(int, input().split())
A = [int(x) for x in input().split()]
d = {}
for a in A:
  	if a in d:
    	d[a] +=1
  	eles:
    	d[a] =1
    
d =sorted(d.values())
if len(d) > k:
  	ans = 0
  	for i in range(len(d)-k):
    	ans += d[i]
  	print(ans)
else:
  	print(0)

Buggy submission (verdict: Runtime Error):
N,K = map(int, input().split())
A = [int(x) for x in input().split()]
d = {}
for a in A:
  if a in d:
    d[a] +=1
  eles:
    d[a] =1
    
d =sorted(d.values())

if len(d) > K:
  ans = 0
  for i in range(len(d)-K):
    ans += d[i]
  print(ans)
else:
  print(0)

Buggy submission (verdict: Runtime Error):
n,k = map(int, input().split())
A = [int(x) for x in input().split()]
d = {}
for a in A:
  if a in d:
    d[a] +=1
  eles:
    d[a] =1
    
d =sorted(d.values())
if len(d) > k:
  ans = 0
  for i in range(len(d)-k):
    ans += d[i]
  print(ans)
else:
  print(0)
Problem p03502 (python)

Fixed submission:
N = int(input())
f = sum(map(int,list(str(N))))

if N % f == 0:
        print("Yes")
else:
        print("No")

Buggy submission (verdict: Runtime Error):
N = map(int,input().split())

f = sum(list(map(int,str(N))))

if N % f == 0:
	print("Yes")
else:
	print("No")

Buggy submission (verdict: Runtime Error):
N = map(int,input().split())

f = sum(list(map(int,str(N))))

if N % f == 0:
print("Yes")
else:
print("No")

Buggy submission (verdict: Runtime Error):
N = map(int,input().split())

fx = sum(list(map(int,str(N))))

if N % fx == 0:
print("Yes")
else:
print("No")
Problem p03544 (python)

Fixed submission:
n = int(input())
L = []
L.append(2)
L.append(1)

for i in range(2,87):
  L.append(L[i-2] + L[i-1])
  

print(L[n])

Buggy submission (verdict: Runtime Error):
n = int(input())
L = []
L.append(2)
L.append(1)

for i in range(2,84):
  L.append(L[i-2] + L[i-1])
  

print(L[n-1])
Problem p03574 (python)

Fixed submission:
h,w = map(int,input().split())
hwl = []
for _ in range(h):
  l = list(input())
  hwl.append(l)
  
for i in range(h):
  for j in range(w):
    if hwl[i][j] == ".":
      cnt = 0
      if i != 0 and j !=0 and hwl[i-1][j-1] == "#":
        cnt +=1
      
      if i != 0 and hwl[i-1][j] == "#":
        cnt +=1
      
      if i != 0 and j < w-1 and  hwl[i-1][j+1] == "#":
        cnt +=1
        
      if j !=0 and hwl[i][j-1] == "#":
        cnt +=1
      
      if j < w-1 and hwl[i][j+1] == "#":
        cnt +=1
        
      if i < h-1 and j != 0 and hwl[i+1][j-1] == "#":
        cnt +=1
      
      if i <h-1 and hwl[i+1][j] == "#":
        cnt +=1
        
      if i < h-1 and j < w-1 and hwl[i+1][j+1] == "#":
        cnt +=1
        
      hwl[i][j] = str(cnt)

  print("".join(hwl[i]))

Buggy submission (verdict: Runtime Error):
h,w = map(int,input().split())
hwl = []
for _ in range(h):
  l = list(input())
  hwl.append(l)
  
for i in range(h):
  for j in range(w):
    if hwl[i][j] == ".":
      cnt = 0
      if i != 0 and j !=0 and hwl[i-1][j-1] == "#":
        cnt +=1
      
      if i != 0 and hwl[i-1][j] == "#":
        cnt +=1
      
      if i != 0 and hwl[i-1][j+1] == "#":
        cnt +=1
        
      if j !=0 and hwl[i][j-1] == "#":
        cnt +=1
      
      if j < w-1 and hwl[i][j+1] == "#":
        cnt +=1
        
      if i < h-1 and j != 0 and hwl[i+1][j-1] == "#":
        cnt +=1
      
      if i <h-1 and hwl[i+1][j] == "#":
        cnt +=1
        
      if i < h-1 and j < w-1 and hwl[i+1][j+1] == "#":
        cnt +=1
        
      hwl[i][j] = str(cnt)

  print("".join(hwl[i]))
Problem p03606 (python)

Fixed submission:
n = int(input())
lr = [[int(i) for i in input().split()] for _ in range(n)]

ans = 0

for i in range(n):
  ans += (lr[i][1] - lr[i][0]) +1
  
  
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
lr = [int(i) for i in input().split()]

ans = 0

for i in range(n):
  ans += lr[i][1] -lr[i][0] +1
  
  
print(ans)
Problem p03607 (python)

Fixed submission:
n = int(input())
d = {}
for i in range(n):
    a = int(input())
    if a in d:
        del d[a]
    else:
        d[a] = 1
print(len(d))

Buggy submission (verdict: Runtime Error):
from collections import Counter
N = inr(input())
A = Counter([int(input()) for i in range(N)])
print(sum(1 if count%2 else 0 for count in A.values()))

Buggy submission (verdict: Runtime Error):
n =int(input())
a =list(int(input()) for i in range(n))

dict = {}
for i in range(n):
  if not(a[i] in dict):
    dict(a[i]) =1
  if s[i] in dict:
    dict.pop(a[i])
    
print(len(dict))

Buggy submission (verdict: Runtime Error):
n =int(input())
a =[int(input()) for i in range(n)]

dict = {}
for i in range(n):
  if not(a[i] in dict):
    dict(a[i]) =1
  if s[i] in dict:
    dict.pop(a[i])
    
print(len(dict))

Buggy submission (verdict: Runtime Error):
n =int(input())
a =[int(input()) for i in range(n)]

dict = {}
for i in range(n):
  if not(a[i] in dict):
    dict(a[i]) ==1
  if s[i] in dict:
    dict.pop(a[i])
    
print(len(dict))
Problem p03627 (python)

Fixed submission:
from collections import Counter
N = int(input())
A = Counter(list(map(int,input().split())))

x = [0,0]
for a in A:
  if A[a]>1:x.append(a)
  if A[a]>3:x.append(a)
x.sort()
print(x[-1]*x[-2])

Buggy submission (verdict: Runtime Error):
from collections import Counter
N = int(input())
A = Counter(list(map(int,input().split())))

x = [0]
for a in A:
  if A[a]>1:x.append(a)
  if A[a]>3:x.append(a)
x.sort()
print(x[-1]*x[-2])
Problem p03632 (python)

Fixed submission:
a, b, c, d = map(int, input().split())
ans = 0
for i in range(0, 101):
    if a < i <= b and c < i <= d:
        ans += 1

print(ans)

Buggy submission (verdict: Runtime Error):
a,b,c,d = map(int,input().split())

if a <= c:
  if b <= c:
    print(0)
    exit()
  
  if b <= d:
    print(b-c)
  elif b >d:
    print(d-c)
    
    
if a > c:
  if d <= a:
    print(0)
    eixt()
    
  if d <= b:
    print(d-a)
  elif d > b:
    print(b-a)
Problem p03635 (python)

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

print((n-1)*(m-1))

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

a = s[0]
b =len(s)-2
c = s[-1]

print(a+b+c)

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

a = s[0]
b =len(s[1:len(s)-1])
c = s[-1]

print(a+b+c)
Problem p03636 (python)

Fixed submission:
s = input()

a = s[0]
b =len(s)-2
c = s[-1]

print( str(a) + str(b) + str(c))

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

a = s[0]
b =len( s[1:len(s)-1])
c = s[len(s)]

print(a+b+c)

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

a = s[1]
b =len( s[2:len(s)-1])
c = s[-1]

print(a+b+c)
Problem p03657 (python)

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

if a % 3 ==0 or b % 3 ==0 or (a+b) % 3 ==0:
  print("Possible")
  
else:
  print("Impossible")

Buggy submission (verdict: Runtime Error):
N,K = map(int,input().split())

list = [int(i) for i in input().split()]

list.sort(reverse=True)

ans = 0
for i in range(K):
  ans += list[i]
  
  
print(ans)
Problem p03680 (python)

Fixed submission:
N = int(input())
D = {i+1:int(input()) for i in range(N)}
d = D[1]
ans = 1


for i in range(N):
  if d==2:
    print(ans)
    exit()
    
  d = D[d]
  ans +=1
  
  
print(-1)

Buggy submission (verdict: Runtime Error):
N = int(input())
D = {i+1:int(input()) for i in range(N)}
d = D{1}
ans = 1


for i in range(N):
  if d==2:
    print(ans)
    exit()
    
  d = D[d]
  ans +=1
  
  
print(-1)
Problem p03738 (python)

Fixed submission:
a = int(input())
b = int(input())

if a>b:
  print("GREATER")
elif a==b:
  print("EQUAL")
  
else:
  print("LESS")

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

if a>b:
  print("GREATER")
elif a==b:
  print("EQUAL")
  
else:
  print("LESS")