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

Fixed submission:
n = int(input())
p = list(map(int,input().split()))
a = 10**9
ans = 0
for i in range(n):
    if p[i]<=a:
        ans+= 1
        a = p[i]
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
l = list(map(int,input().split()))
a = 10**9
ans = 0
for i in range(n):

    if l[i] <= a:
        ans += 1
         a = l[i]
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
l = list(map(int,input().split())
a = 10**9
ans = 0
if l[i] <= a:
    ans += 1
    a = l[i]
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
l = list(map(int,input().split()))
a = 10**9
ans = 0
if l[i] <= a:
    ans += 1
    a = l[i]
print(ans)
Problem p02802 (python)

Fixed submission:
n,m = map(int,input().split())
a = [0]*n
ac,wa = 0,0
for i in range(m):
    p,s = map(str,input().split())
    p = int(p)
    if s == "AC" and a[p-1] != -1:
        ac +=1
        wa += a[p-1]
        a[p-1] = -1
    elif s == "WA" and a[p-1] != -1:
        a[p-1] += 1
print(ac,wa)

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
a = [0]*n
for i in range(m):
    p,s = map(str,input().split())
    p = int(p)
    if s == "AC" and a[p-1] != -1:
        ac +=1
        wa += a[p-1]
        a[p-1] = -1
    elif s == "WA" and a[p-1] != -1:
        wa += 1
print(ac,wa)
Problem p02817 (python)

Fixed submission:
s,t = map(str,input().split())
print(t+s)

Buggy submission (verdict: Runtime Error):
s,t = map(input().split())
print(s+t)
Problem p02861 (python)

Fixed submission:
N = int(input())
dis_list = [list(map(int,input().split())) for _ in range(N)]
ans = 0
for x1,y1 in dis_list:
    for x2,y2 in dis_list:
        ans += ((x1-x2)**2 + (y1-y2)**2)**0.5
print(ans/N)

Buggy submission (verdict: Runtime Error):
n = int(input())
x = []; y = []
for i in range(n):
    x,y = [int(i) for i in input().split() ]
    x.append(x);y.append(y)
s = 0

for i in range(n):
    for j in range(n):
        s += ((x[i]-x[j])**2)+(y[i]-y[j]**2)**.5
print(s/n)
Problem p02888 (python)

Fixed submission:
from bisect import bisect_left
n = int(input())
l = sorted(list(map(int,input().split())))

ans = 0
for i in range(n):
    for j in range(i+1,n):
        ans += bisect_left(l,l[i]+l[j])-(j+1)
print(ans)

Buggy submission (verdict: Runtime Error):
from bisect import bisect_left

n = int(input())
l = sorted(list(map(int,input().split())))
ans = 0

for i in range(n):
    for j in range(i+1,n):
        ans += bisect_left(l.,l[i]+l[j])-(j+1)
print(ans)
Problem p02898 (python)

Fixed submission:
n,k = map(int,input().split())
h = list(map(int,input().split()))
a = 0
for i in range(n):
    if h[i] >= k:
        a += 1
print(a)

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
h = int(input())
a = 0
for i in range(n):
    if h[i] > k:
        a += 1
print(a)

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
h = input()
a = 0
for i in range(n):
    if h[i] > k:
        a += 1
print(a)
Problem p02910 (python)

Fixed submission:
s = list(input())
a = True

for i in range(len(s)):
    if i%2==0 and s[i]=='L':
        a = False
    elif i%2==1 and s[i]=='R':
        a = False
if a:
    print('Yes')
else:
    print('No')

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

for i in range(les(s)):
    if i%2==0 and s[i]=="L":
        a = False
    elif i%2 ==1 and s[i]=="R":
        a = False
if a:
    print("Yes")
else:
    print("No")

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

for i in range(les(s)):
    if i%2==0 and s[i]=="L":
        a = False
    elif i%2 ==1 and s[i]=="R":
        a = False
if a:
    print("Yes")
else:
    print("No")
Problem p02911 (python)

Fixed submission:
n,k,q = map(int,input().split())
attend = [k-q for i in range(n)]
a = 0
for i in range(q):
    a = int(input())
    attend[a-1]+= 1
for i in range(n):
    if (attend[i] <= 0):
        print("No")
    else:
        print("Yes")

Buggy submission (verdict: Runtime Error):
n,k,q = map(int,input().split())
li = [k-q for i in range(n)]
a = 0
for i in range(n):
    a = int(input())
    li[a-1]+=1
for i in range(n):
    if li[i] <= 0:
        print("No")
    else:
        print("Yes")

Buggy submission (verdict: Runtime Error):
n,q,k = map(int,input().split())
attend = [k-q for i in range(n)]
a = 0
for i in range(q):
    a = int(input())
    attend[a-1]+= 1
for i in range(n):
    if (attend[i] <= 0):
        print("No")
    else:
        print("Yes")

Buggy submission (verdict: Runtime Error):
n,q,k = map(int,input().split())
attend = [k-q for i in range(n)]
a = 0
for i in range(q):
    a = int(input())
    attend[a-1]+= 1
for i in range(n):
    if (attend[1] <= 0):
        print("No")
    else:
        print("Yes")
Problem p02917 (python)

Fixed submission:
n = int(input())
b = list(map(int,input().split()))
a = b[0]
for i in range(1,n-1):
    a += min(b[i-1],b[i])
a += b[n-2]
print(a)

Buggy submission (verdict: Runtime Error):
n = int(input())
b = list(map(int,input().split()))
a = 0
for i in range(n-1):
    a += min(b[i],b[i+1])
a += b[n-2]
print(a)
Problem p02921 (python)

Fixed submission:
a = input()
b = input()
c = 0
for i in range(3):
    if a[i] == b[i]:
    
        c +=1
print(c)

Buggy submission (verdict: Runtime Error):
s = input()
t = input()
ans = 0
for i in range(3):
    if s[i] == t[i]
    ans +=1
print(ans)

Buggy submission (verdict: Runtime Error):
a = input()
b = input()
c = 0
for i in range(3):
    if a[i] == b[i]
        c +=1
print(c)

Buggy submission (verdict: Runtime Error):
import math
a,b = map(int,input().split())
c = math.ceil(b/a)
if a*c-c >=b:
    print(c)
else:
    print(c+1)
Problem p02923 (python)

Fixed submission:
n = int(input())
h = list(map(int,input().split()))
c = 0
d = 0

for i in range(n-1):
    if h[i]>= h[i+1]:
        c += 1
        d = max(d,c)
    else:
        c = 0
print(d)

Buggy submission (verdict: Runtime Error):
n = int(input())
h = list(map(int,input().split()))
ans = 0
ans_list = []
for i in range(n-1):
    if h[i]>= h[i+1]:
        ans += 1
        ans_list.append(ans)
    else:
        ans = 0
print(max(ans_list))
Problem p02934 (python)

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

b = 0
for i in range(n):
    b += float(1/a[i])
print(float(1/b))

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

b = 0
for i in range(a):
    b += float(1/a[i])
print(float(1/b))
Problem p02936 (python)

Fixed submission:
n,q=list(map(int,input().split()))
GR=[[] for _ in range(n)]
for i in range(n-1):
  a,b=list(map(int,input().split()))
  GR[a-1].append(b)
  GR[b-1].append(a)
 
ans=[0 for _ in range(n)]
for i in range(q):
  p,x=list(map(int,input().split()))
  ans[p-1] += x
  
gr=[1]
parent=[0 for _ in range(n)]
while gr:
  po=gr.pop()
  for no in GR[po-1]:
    if no == parent[po-1]:
      continue
    gr.append(no)
    parent[no-1]=po
    ans[no-1] += ans[po-1]
      
print(' '.join(map(str,ans)))

Buggy submission (verdict: Runtime Error):
n,q = map(int,input().split())
ab = [[int(x) for x in input().split()]for _ in range(n-1)]
px = [[int(x) for x in input().split()]for _ in range(q)]

gr = [[]for _ in range(n+1)]
for a,b in ab:
    gr[a].append(b)
    gr[b].append(a)

value = [0]*(n+1)
for p,x in px:
    value[p] += x

def dfs(v,parent,add):
    value[v] += add
    for x in gr[v]:
        if x ==parent:
            continue
        dfs(x,v,value[v])
dfs(1,0,0)

ans = ' '.join(map(str,value[1:]))
print(ans)

Buggy submission (verdict: Runtime Error):
n,q = map(int,input().split())
ab = [[int(x) for x in input().split()]for _ in range(n-1)]
px = [[int(x) for x in input().split()]for _ in range(q)]

gr = [[]for _ in range(n+1)]
for a,b in ab:
    gr[a].append(b)
    gr[b].append(a)

value = [0]*(n+1)
for p,x in px:
    value[p] += x

def dfs(v,parent,add):
    value[v] += add
    for x in gr[v]:
        if x ==parent:
            continue
        dfs(x,v,value[v])
dfs(1,0,0)

ans = ' '.join(map(str,value[1:]))
print(ans)

Buggy submission (verdict: Runtime Error):
n,q = map(int,input().split())
ab = [[int(x) for x in input().split()]for _ in range(n-1)]
px = [[int(x) for x in input().split()]for _ in range(q)]

gr = [[]for _ in range(n+1)]
for a,b in ab:
    gr[a].append(b)
    gr[b].append(a)

value = [0]*(n+1)
for p,x in px:
    value[p] += x

def dfs(v,parent,add):
    value[v] += add
    for x in gr[v]:
        if x ==parent:
            continue
        dfs(x,v,value[v])
dfs(1,0,0)

ans = ' '.join(map(str,value[v]))
print(ans)

Buggy submission (verdict: Runtime Error):
n,q = map(int,input().spliot())
ki = [0]*(n+1)
for i in range(n-1):
    a,b = map(int,input().split())
    ki[b] = a

c = [0]*(n+1)
for i in range(q):
    p,x = map(int,input().split())
    c[p] += x
for i in range(1,n+1):
    c[i] += c[ki[i]]
print("".join(map(str,c[1:])))
Problem p02952 (python)

Fixed submission:
a = int(input())
b = 0
for i in range(1,a+1):
    if len(str(i)) % 2 == 1:
        b += 1
print(b)

Buggy submission (verdict: Runtime Error):
a = int(input())
b = 0
for i in a:
    if a[i] % 2 == 1:
        b += 1
print(b)
Problem p02957 (python)

Fixed submission:
A,B = map(int,input().split())
 
if (A+B)%2 == 0:
    print((A+B)//2)
else:
    print("IMPOSSIBLE")

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

if (a+b)%2 ==0:
  print((a+B)/2)
else:
  print("IMPOSSIBLE")

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
if (a+b)%2 ===0 :
    print((a+b)/2)
else:
    print('IMPOSSIBLE')

Buggy submission (verdict: Runtime Error):
a,b = map(int,input.split())
if (a+b)%2 ==0 :
    print((a+b/2))
else:
    print("IMPOSSIBLE")

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
if (a+b)%2 ===0:
  print((a+b)/2)
 else:
  print("IMPOSSIBLE")
Problem p02969 (python)

Fixed submission:
a = int(input())
print (3*a**2)

Buggy submission (verdict: Runtime Error):
r = int(input())
print(3*R**2)
Problem p02982 (python)

Fixed submission:
n,*l, = [list(map(int,s.split()))for s in open(0)]
cnt = 0
for i in range(len(l)-1):
    for j in range(i+1,len(l)):
        dist = 0
        for d in range(n[1]):
            dist += (l[i][d] - l[j][d])**2
        if (dist**(0.5))%1 ==0:
            cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
n,d = map(int,input().split())
l = [list(map(int,input().split()))for _ in range(n)]
ans = 0
for i in raneh(n):
    for j in range(i+1,n):
        r = 0
        for k in range(d):
            r += (l[i][k]-l[j][k])**2
            r = r**0.5
            if r == int(r):
                ans += 1
print(ans)
Problem p02983 (python)

Fixed submission:
l,r = map(int,input().split())
if r-l >= 2019:
    print(0)
    exit()
ans = 2020
for i in range(l,r):
    for j in range(i+1,r+1):
        t =(i*j)%2019
        ans=min(ans,t)
print(ans)

Buggy submission (verdict: Runtime Error):
l,r = map(int,input().split())
if r-l >=2019:
    print(0)
else:
    ans = 2019
    for i in raneg(l,r):
        for j in range(i+1,r+1):
            ans = min(ans,i*j%2019)
    print(ans)
Problem p02993 (python)

Fixed submission:
s = input()

if s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:
    print("Bad")
else:
    print("Good")

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

if s[0] == s[1] or s[1] == s[2] or s[2] == s[3] or s[3] == s[4]
    print("Bad")
else:
    print("Good")
Problem p02994 (python)

Fixed submission:
n,l = map(int,input().split())
taste = [l+i for i in range(n)]
eat = min(taste,key = abs)
taste.remove(eat)
print(sum(taste))

Buggy submission (verdict: Runtime Error):
n.l = map(int,input().split())
al = [l+i for i in range(n)]
a = min(al,key=abs)
al.remove(a)
print(sum(al))
Problem p02995 (python)

Fixed submission:
from fractions import gcd
A, B, C, D = map(int,input().split())
total = B - A + 1
divC = B//C - (A-1)//C
divD = B//D - (A-1)//D
lcm = int(C * D / gcd(C, D))
divCD = B//lcm - (A-1)//lcm
print(total - divC - divD + divCD)

Buggy submission (verdict: Runtime Error):
from fractions import gcd
a,b,c,d = map(int,input().split())
cab = (b//c)-((a-1)//c)
dab = (b//d)-((a-1)//d)
lcm = int(c*d/gcd(c,d))
cdab = (b//lcm)-((a-1)//lcm)
print((b-a+1)-cab-dad+cdab)

Buggy submission (verdict: Runtime Error):
from fractions import gcd
a,b,c,d = map(int,input().split())
cab = (b//c)-((a-1)//c)
dab = (b//d)-((a-1)//c)
lcm = int(c*d/gcd(c,d))
cdab = (b//lcm)-((a-1)//lcm)
print((b-a+1)-cab-dad+cdab)

Buggy submission (verdict: Runtime Error):
from fractions import gcd
a,b,c,d = map(int,input().split())
cab = (b//c)-((a-1)//c)
dab = (b//d)-((a-1)//c)
lcm = int(c*d/gcd(c,d))
cdab = (b//lcm)-((a-1)//lcm)
print((b-a+1)-cab-cad+cdab)
Problem p02996 (python)

Fixed submission:
n= int(input())
task = [list(map(int,input().split()))for i in range(n)]

task.sort(key= lambda x: x[1])
time = 0
for i in range(n):
    time += task[i][0]
    if time > task[i][1]:
        print("No")
        break
else:
    print("Yes")

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

task.sort(key= lambda x: x[1])
time = 0
for i in task:
    time += task[i][0]
    if time > task[i][1]:
        print("No")
        break
else:
    print("Yes")

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

 task.sort(key= lambda x:x[1])
 time = 0
 for a,b in task:
     time += a
     if time > b:
         print("No")
         break
    else:
        print("Yes")
Problem p03030 (python)

Fixed submission:
n = int(input())
 
 
x = [list(input().split(" ")) for i in range(n)]
 
for i in range(n):
    x[i][1] = int(x[i][1])
 
test2 = sorted(x, key = lambda k:(k[0],-k[1]))
 
for i in range(n):
    print(x.index(test2[i]) + 1)

Buggy submission (verdict: Runtime Error):
n = int(input())
x = [list(input().split(""))for i in range(n)]

for i in range(n):
    x[i][1] = int(x[i][1])

test2 = sorted(x,key = lambda k :(k[0],-k[1]))

for i in range(n):
    print(x.index(test2[i])+1)
Problem p03031 (python)

Fixed submission:
n,m = map(int,input().split())
l = [list(map(int,input().split()))[1:]for i in range(m)]
p = list(map(int,input().split()))
form = "0"+str(n)+"b"
ans = 0
for i in range(2**n):
    ptn = format(i,form)
    light = True
    for j in range(m):
        s = sum(int(ptn[k-1])for k in l[j])
        if s%2 != p[j]:
            light = False
    if light == True:
        ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
s = [list(map(int,input().split()))[1:]for i in range(m)]
p = list(map(int,input().split()))
form = "0"+str(n)+"b"
ans = 0
for i in range(2**n):
    ptn = format(i,form)
    light = True
    for j in range(m):
        s = sum(int(ptn[k-1])for k in s[j])
        if s%2 != p[j]:
            light = False
    if light == True:
        ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
s = [list(map(int,input().split()))for i in range(m)]
p = list(map(int,input().split()))
ans = 0
for i in range(2**n):
    ptn = bin(i)[2:].rjust(n,"0")
    light = True
    for j in range(m):
        tmp = 0
        for k in range(1,s[j][0]+1):
            if ptn[s[j][n]-1] == "1":
                tmp += 1
        if tmp % 2 != p[j]% 2:
            light = False
    if light:
        ans += 1
print(ans)
Problem p03035 (python)

Fixed submission:
a,b = map(int,input().split())
if a >= 13:
    print(b)
elif 6 <= a <= 12:
    print(b//2)
else:
    print(0)

Buggy submission (verdict: Runtime Error):
if a >= 13:
    print(b)
elif a >= 6 and a <= 12:
    print(b//2)
else:
    print(0)
Problem p03037 (python)

Fixed submission:
n,m = map(int,input().split())
l = [0]*m
r = [0]*m
for i in range(m):
    l[i],r[i] = map(int,input().split())
if min(r)-max(l) < 0:
    print(0)
else:
    print(min(r)-max(l)+1)

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
l = [0]*m
r = [0]*m
for i in range(m):
    l[i],r[i] = map(int,input().split())
if min(r)-max(l)<0:
    print(0)
else:
    print(min(r)-max(l)+1
Problem p03043 (python)

Fixed submission:
n,k = map(int,input().split())
ans = 0
for i in range(1,n+1):
    j = 0
    if i < k:
        while i*(2**j) < k:
            j +=1
        ans += (1/n) *1/(2**j)
    else:
        ans += (1/n)
print(ans)

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
ans = 0
for i in range(1,n+1):
    j =0
    if i < k:
        while i *(2**j) < k:
            j += 1
        ans +=(1/n)*/(2**j)
    else:
        ans += (1/n)
print(ans)

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
ans = 0
for i in range(1,n+1):
    j = 0
    if i < k:
        while i*(2**j) < k:
            j += 1
            ans += (1/n)*1/(2**j)
    else:
    ans += (1/n)
print(ans)
Problem p03085 (python)

Fixed submission:
b = input()
if b == "T":
  print("A")
elif b == "A":
  print("T")
elif b == "G":
  print("C")
else:
  print("G")

Buggy submission (verdict: Runtime Error):
b = input()
if b == T:
  print("A")
elif b == A:
  print("T")
elif b == G:
  print("C")
else:
  print("G")
Problem p03106 (python)

Fixed submission:
a,b,k=map(int,input().split())
ans = []
for i in range(1,101):
    if a % i == b % i == 0:
        ans.append(i)
print(ans[-k])

Buggy submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
ans = 0
for i in range(1,101):
    if a % i == b % i == 0:
        ans.append(i)
print(ans[-k])

Buggy submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
ans = 0
for i in range(1,101):
    if a % i == b % i == 0:
        ans.append(i)
print(ans[-k])
Problem p03125 (python)

Fixed submission:
a,b = map(int,input().split())
if b%a ==0:
    print(a+b)
else:
    print(b-a)

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split('/'))
if b%a ==0:
    print(a+b)
else:
    print(b-a)
Problem p03126 (python)

Fixed submission:
n,m = map(int,input().split())
A = [list(map(int,input().split()))for i in range(n)]
ans = {i+1 for i in range(m)}
for a in A:
    ans = ans & set(a[1:])
print(len(ans))

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
A = [list(map(int,input().split())for i in range(n)]
ans = {i+1 for i in range(m)}
for a in A:
    ans = ans & set(a[1:])
print(len(ans))

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
A = list[map(int,input().split()) for i in range(n)]
ans = {i+1 for i in range(m)}
for a in A:
    ans = ans & set(a[1:])
print(len(ans))

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
a = list[map(int,input().split()) for i in range(n)]
ans = {i+1 for i in range(m)}
for b in a:
    ans = ans & set(a[1:])
print(len(ans))
Problem p03145 (python)

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

Buggy submission (verdict: Runtime Error):
a,b,c = map(int,input().split('/'))
print(a*b/2)
Problem p03147 (python)

Fixed submission:
n = int(input())
h = list(map(int,input().split()))
cnt = 0
for i in range(n-1):
    cnt +=min(h[i],h[i+1])
print(sum(h)-cnt)

Buggy submission (verdict: Runtime Error):
n = int(input())
h = list(map(int,input().split()))
cnt = 0
for i in range(n-1):
    cnt +=min(h[i],h[i+1])
print(sum[h]-cnt)
Problem p03219 (python)

Fixed submission:
a,b = map(int,input().split())
print(a+b//2)

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split)
print(a+b//2)
Problem p03239 (python)

Fixed submission:
N,T = map(int,input().split())
m = 1001
for i in range(N):
    c,t = map(int,input().split())
    if t <= T:
        m = min(m,c)
print('TLE' if m == 1001 else m)

Buggy submission (verdict: Runtime Error):
N,T = map(int,input().split())
m = 1001
for i in range(n):
    c,t = map(int,input().split())
    if t <= T:
        m = min(m,c)
print('TLE' if m == 1001 else m)
Problem p03261 (python)

Fixed submission:
n = int(input())
w = [input() for i in range(n)]
bl = True
if len(w) != len(set(w)):
    bl = False
for i in range(n-1):
    if w[i][-1] != w[i+1][0]:
        bl = False
print("Yes" if bl else"No")

Buggy submission (verdict: Runtime Error):
n = int(input())
w = [input() for i in range(n)]
bl = True
if len(w) != len(set(w)):
    bl = False
for i in range(n-1):
    if w[i][1] != w[i+1][0]:
        bl = False
print("Yes" if bl else"No")
Problem p03264 (python)

Fixed submission:
a = int(input())
print((a//2)*((a+1)//2))

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

print((k//2)*((k+1)//2))
Problem p03273 (python)

Fixed submission:
h,w = map(int,input().split())
a = [[i for i in input()] for _ in range(h)]
b = [x for x in a if "#" in x]
c = zip(*[x for x in zip(*b) if "#"in x])
for d in c:
    print("".join(d))

Buggy submission (verdict: Runtime Error):
h,w = map(int,input().split())
a = [[i for i in input()] for _ in range(h)]
b = [x for in a if "#" in x]
c = zip(*[x for x in zip(*b) if "#"in x])
for d in c:
    print("".join(d))
Problem p03280 (python)

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

Buggy submission (verdict: Runtime Error):
a,b = map(int,input(),split())
print(a*b-a-b)
Problem p03316 (python)

Fixed submission:
n = input()
s = sum(map(int,n))
if int(n) % s == 0:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
n = input()
s = sum(map(int,n))
if int(n)% s == 0:
    print("Yes")
else:
    print("No
Problem p03325 (python)

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
ans = 0
for i in a:
    while not i %2:
        i//= 2
        ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
ans = 0
for i in a:
    while(i % 2 ==0):
        i // = 2
        ans += 1
print(ans)
Problem p03338 (python)

Fixed submission:
n = int(input())
s = input()
num = [len(set(s[:i]) & set(s[i:]))for i in range(n)]
print(max(num))

Buggy submission (verdict: Runtime Error):
n = int(input())
s = input()
num = [len(set(s[:i]) & set(s[i:])for i in range(n))]
print(max(num))
Problem p03360 (python)

Fixed submission:
a,b,c = map(int,input().split())
k = int(input())
print(sum([a,b,c])+(max(a,b,c)*(2**k-1)))

Buggy submission (verdict: Runtime Error):
a,b,c = map(int,input().split())
k = int(input())
print(sum(a,b,c)+(max(a,b,c)*(2**k-1)))
Problem p03369 (python)

Fixed submission:
a = input()
print(700+a.count('o')*100)

Buggy submission (verdict: Runtime Error):
a = input()
print(700+a.count(o)*100)
Problem p03447 (python)

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

print((x-a)%b)

Buggy submission (verdict: Runtime Error):
x = int(input())
a = int(input())
b = int(input())

c = x-a
print(int(c%b())
Problem p03470 (python)

Fixed submission:
n = int(input())
d = list(int(input())for i in range(n))
print(len(set(d)))

Buggy submission (verdict: Runtime Error):
n = int(input())
d = [list(input())for i in range(n)]
print(len(set(d)))

Buggy submission (verdict: Runtime Error):
n = int(input())
d = [list(input())for i in ranghe(n)]
print(len(set(d)))
Problem p03487 (python)

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

n = len(a)
a.sort()
a.append(0)
ans = 0
i = 0

while i < n:
    cnt = 1
    while a[i] == a[i+1]:
        cnt += 1
        i += 1
    if cnt >= a[i]:
        ans += cnt - a[i]
    else:
        ans += cnt
    i += 1
print(ans)

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

n = len(a)
a.sort()
a.append()
ans = 0
i = 0

while i < n:
    cnt = 1
    while a[i] == a[i+1]:
        cnt += 1
        i += 1
    if cnt >= a[i]:
        ans += cnt - a[i]
    else:
        ans += cnt
    i += 1
print(ans)
Problem p03544 (python)

Fixed submission:
n = int(input())
l = [2,1]
for i in range(2,n+1):
    l.append(l[i-1]+l[i-2])
print(l[n])

Buggy submission (verdict: Runtime Error):
n = int(input())
l = [2,1]
for i in range(2,n+1):
    l.append(l[i-1]+l[i-2])
print(l[i])
Problem p03555 (python)

Fixed submission:
a = input()
b = input()
if a[0] == b[2] and a[1] == b[1] and a[2] == b[0]:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
a = input()
b = input()
if a[0] == b[2] and a[1] == b[1] and a[2] == b[0]:
    print("YES")
else:
    priont("NO")