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

Fixed submission:
s = int(input())
if s == 22:
    print('Christmas Eve Eve Eve')
if s == 23:
    print('Christmas Eve Eve')
if s == 24:
    print('Christmas Eve')
if s == 25:
    print('Christmas')

Buggy submission (verdict: Runtime Error):
s = int(input)
if s == 22:
    print('Christmas Eve Eve Eve')
if s == 23:
    print('Christmas Eve Eve')
if s == 24:
    print('Christmas Eve')
if s == 25:
    print('Christmas')
Problem p03243 (python)

Fixed submission:
a=list(str(input()))
e=int(''.join(a))


b=int(a[1])-int(a[1]*111)
c=a[0]
c=int(c)
b = e-c*111
if b <=0:
  print(c*111)
else:
  c+=1
  print(c*111)

Buggy submission (verdict: Runtime Error):
a=list(str(input()))
e=int(''.join(a))


b=int(a[1])-int(a[1]*111)
c=a[0]
c=int(c)
b = e-c*111
if b =<0:
  print(c*111)
else:
  c+=1
  print(c*111)
Problem p03273 (python)

Fixed submission:
a, b = map(int, input().split())
A = [list(input().split()) for i in range(a)]

lines = []
for j in A:
    for k in j:
        if "#" in k:
            lines.append(k)
lines_t = ["".join(list(i)) for i in zip(*lines)]
B = []
for g in lines_t:
    if "#" in g:
        B.append(g)
C = []
C = ["".join(list(i)) for i in zip(*B)]
for v in C:
    print(v)

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

lines =[]
for j in A:
  for k in j:
    if "#" in k:
      lines.append(k)
lines_t = ["".join(list(i)) for i in zip(*lines)]
B=[]
for g in lines_t:
    if "#" in g:
      B.append(g)
C=[]
C= ["".join(list(i)) for i in zip(*B)]
for v in C:
  print(v)
Problem p02999 (python)

Fixed submission:
x,y=map(int,input().split())
if x<y:
    print(0)
else:
    print(10)

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
k = 1
s = 0
for i in map(int, input().split()):
    if s + i <= b:
        k += 1
    s += i
print(k)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
k = 1
s = 0
for i in map(int,input().split()):
    if s+i<=b:
        k+=1
    s+=i
Problem p03001 (python)

Fixed submission:
w,h,x,y= map(int,input().split())
print(w*h/2,int(x==w/2 and y == h/2))

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
c = list(map(int, input().split()))
s = [0]
ans = 0
for i in range(n):
    s.append(s[-1]+c[i])
r = 0
for l in range(n):
    while r<n and s[r]-s[l]<k:
        r+=1
    ans+=n-r+int(s[r]-s[l]>=k)
print(ans)
Problem p02999 (python)

Fixed submission:
X,A = list(map(int,input().split()))
print(0 if X<A else 10)

Buggy submission (verdict: Runtime Error):
intA = int(input())
intX = int(input())

if 0<=intA and intA<=9 and 0<=intX and intX<=9:
	if intX<intA:
		print(0)
	else:
		print(10)

Buggy submission (verdict: Runtime Error):
intA = int(input())
intX = int(input())

if 0<=intA and intA<=9 and 0<=intX and intX<=9:
	if intX<intA:
		print(0)
	else:
		print(1)
Problem p03000 (python)

Fixed submission:
N,X=list(map(int,input().split()))
i=list(map(int,input().split()))
listD=[0]
d=0

for s in i:
	d=d+s
	if d <= X:
		listD.append(d)
        
print(len(listD))

Buggy submission (verdict: Runtime Error):
N,X=list(map(int,open().split()))
i=list(map(int,open().split()))
listD=[0]
d=0

for s in i:
	d=d+s
	if d <= X:
		listD.append(d)
        
print(len(listD))
Problem p03086 (python)

Fixed submission:
S=list(input())
li=0
li2=[]
for i in S:
	if i=='A' or i=='C' or i=='G' or i=='T':
		li+=1
	else:
		li2.append(li)
		li=0
li2.append(li)
print(max(li2))

Buggy submission (verdict: Runtime Error):
S=list(input())
li=0
li2=[]
for i in S:
	if i=='A' or i=='C' or i=='G' or i=='T':
		li+=1
	else:
		li2.append(li)
		li=0
print(max(li2))
print(li2)

Buggy submission (verdict: Runtime Error):
S=list(input())
li=0
li2=[]
for i in S:
	if i=='A' or i=='C' or i=='G' or i=='T':
		li+=1
	else:
		li2.append(li)
		li=0
print(max(li2))
Problem p02999 (python)

Fixed submission:
x, a = input().split()
print(0) if (x < a) else print(10)

Buggy submission (verdict: Runtime Error):
n, x = input().split()
l_list = input().split()
i = 0
ans = 0
y = 1
for l in l_list:
    if i > int(x):
        print(ans)
        y = 0
        break
    i += int(l)
    ans += 1
if y:
  print(ans)
Problem p03059 (python)

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

print(int((t+0.5)/a)*b)

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

print(int((t+0.5)/a)*b)
Problem p02999 (python)

Fixed submission:
# -*- coding: utf-8 -*-


def main():
    x, a = map(int, input().split())
    if x < a:
        print('0')
    else:
        print('10')



if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
from bisect import bisect_left


def main():
    N, K = map(int, input().split())
    *a, = map(int,input().split())
    sum_a = [0] * N
    sum_a[0] = a[0]
    for i in range(N - 1):
        sum_a[i + 1] = sum_a[i] + a[i + 1]

    ans = N - bisect_left(sum_a, K)

    for l in range(1, N):
        ans += N - bisect_left(sum_a, K + sum_a[l - 1])

    print(ans)




if __name__ == '__main__':
    main()
Problem p03000 (python)

Fixed submission:
# -*- coding: utf-8 -*-


def main():
    n, x = map(int, input().split())
    lst = list(map(int,input().split()))
    lst = lst[:n]

    d = []
    for i in range(n + 1):
        if i == 0:
            d.append(0)
        else:
            d.append(d[i - 1] + int(lst[i - 1]))

    bound = 0

    for n, i in enumerate(d):
        if i <= x:
            bound += 1
        else:
            break
    print(bound)


if __name__ == '__main__':
    main()

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


def main():
    n, x = map(int, input().split())
    lst = [input() for i in range(n)]
    print(n, x)
    print(lst)

    d = []
    for i in range(n + 1):
        if i == 0:
            d.append(0)
        else:
            d.append(d[i - 1] + int(lst[i - 1]))
    print(d)

    bound = 0

    for n, i in enumerate(d):
        if i <= x:
            bound += 1
        else:
            break
    print(bound)


if __name__ == '__main__':
    main()

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


def main():
    n, x = map(int, input().split())
    lst = [input() for i in range(n)]
    print(n, x)
    print(lst)
    
    d = []
    for i in range(n + 1):
        if i == 0:
            d.append(0)
        else:
            d.append(d[i - 1] + int(lst[i - 1]))
    print(d)
    
    bound = 0
    
    for n, i in enumerate(d):
        if i <= x:
            bound += 1
        else:
            break
    print(bound)




if __name__ == '__main__':
    main()
Problem p03773 (python)

Fixed submission:
if __name__ == '__main__':
    h1 = input()
    a, b = h1.split()
    print((int(a) + int(b)) % 24)

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

num = [0 for x in range(N)]
total = [0 for x in range(N)]

for i, v in enumerate(L):
    for j in reversed(range(1, i + 1)):
        new_v = total[j - 1] + v
        if(new_v > total[j]):
            total[j] = new_v
            num[j] = num[j - 1]
        elif(new_v == total[j]):
            num[j] = num[j] + num[j - 1]

    if(v > total[0]):
        total[0] = v
        num[0] = 1
    elif(v == total[0]):
        num[0] = num[0] + 1

print(total)
total = [x / (i + 1) for i, x in enumerate(total)]
total = total[(A - 1):B]
num = num[(A - 1):B]

maxV = max(total)
maxNum = sum([j for i, j in zip(total, num) if i == maxV])
print(maxV)
print(maxNum)
Problem p02999 (python)

Fixed submission:
import sys

#argv=sys.argv

#print(argv)

argv=input()
argv1,argv2=argv.split(" ")


x=int(argv1)
a=int(argv2)

if(x<a):
    print(0)
else:
    print(10)

Buggy submission (verdict: Runtime Error):
import sys

argv=sys.argv

#print(argv)

x=int(argv[1])
a=int(argv[2])

if(x<a):
    print(0)
else:
    print(10)
Problem p03693 (python)

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

s=r*100+g*10+b

if s%4==0:
    print("YES")
else :
    print("NO")

Buggy submission (verdict: Runtime Error):

N=int(input())

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

color=[0,0,0,0,0,0,0,0]
alles=0

for i in range(N) :
    
    if a[i]<400 :
        color[0]+=1
    elif a[i]<800 :
        color[1]+=1
    elif a[i]<1200 :
        color[2]+=1
    elif a[i]<1600 :
        color[3]+=1
    elif a[i]<2000 :
        color[4]+=1
    elif a[i]<2400 :
        color[5]+=1
    elif a[i]<2800 :
        color[6]+=1
    elif a[i]<3200 :
        color[7]+=1
    else :
        alles+=1

        
while 0 in color :color.remove(0)
eight=int(8)

if alles>=8 :
    print(eight," ",eight)
elif alles+len(color)>=8 :
    if alles>=len(color) :
        print(alles," ",eight)
    else :
        print(len(color)," ",eight)
else :
    if alles>=len(color) :
        print(alles," ",len(color)+alles)
    else :
        print(len(color)," ",len(color)+alles)
Problem p03695 (python)

Fixed submission:

N=int(input())

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

color=[0,0,0,0,0,0,0,0]
alles=0

for i in range(N) :
    
    if a[i]<400 :
        color[0]+=1
    elif a[i]<800 :
        color[1]+=1
    elif a[i]<1200 :
        color[2]+=1
    elif a[i]<1600 :
        color[3]+=1
    elif a[i]<2000 :
        color[4]+=1
    elif a[i]<2400 :
        color[5]+=1
    elif a[i]<2800 :
        color[6]+=1
    elif a[i]<3200 :
        color[7]+=1
    else :
        alles+=1

        
while 0 in color :color.remove(0)


if len(color)==0 :
    print(int(1)," ",len(color)+alles)
else :
    print(len(color)," ",len(color)+alles)

Buggy submission (verdict: Runtime Error):

N=int(input())

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

color=[0,0,0,0,0,0,0,0]
alles=0

for i in range(N) :
    
    if a[i]<400 :
        color[0]+=1
    elif a[i]<800 :
        color[1]+=1
    elif a[i]<1200 :
        color[2]+=1
    elif a[i]<1600 :
        color[3]+=1
    elif a[i]<2000 :
        color[4]+=1
    elif a[i]<2400 :
        color[5]+=1
    elif a[i]<2800 :
        color[6]+=1
    elif a[i]<3200 :
        color[7]+=1
    else :
        alles+=1

        
while 0 in color :color.remove(0)
eight=int(8)

if alles>=8 :
    print(eight," ",eight)
elif alles+len(color)>8 :
    if alles>=len(color) :
        print(alles," ",eight)
    else :
        print(len(color)," ",eight)
else :
    if alles>=len(color) :
        print(alles," ",lem(color)+alles)
    else :
        print(len(color)," ",len(color)+alles)
Problem p03697 (python)

Fixed submission:

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

s=a+b


if s>=10 :
    print("error")
else :
    print(s)

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

s=a[0]+a[1]

if s>10 :
    print("error")
else :
    print(s)

Buggy submission (verdict: Runtime Error):
a=input()
b=input()
s=a+b
if s>9 :
    print('error')
else :
    print(s)

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

if a+b>9 :
    print('error')
else :
    print(a+b)
Problem p03067 (python)

Fixed submission:
import numpy as np
huga = list(map(int, input().split()))
a=huga[0]
b=huga[1]
c=huga[2]
if a>b:
  x=a
  a=b
  b=x
        
      
if a<c and b>c:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
    import numpy as np
    huga = list(map(int, input().split()))
    a=huga[0]
    b=huga[1]
    c=huga[2]
    if a>b:
      x=a
      a=b
      b=x
      
     
    if a<c and b>c:
      print("Yes")
    else:
      print("No")

Buggy submission (verdict: Runtime Error):
import numpy as np
huga = list(map(int, input().split()))
a=huga[0]
b=huga[1]
c=huga[2]
if a>b:
  a=x
  b=a
  a=x

if a<c and b>c:
  print("Yes")
else:
  print("No")
Problem p02999 (python)

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

if x < a:
    print(0)
else:
    print(10)

Buggy submission (verdict: Runtime Error):
w, h, x, y = map(int, input().split())

s = w * h / 2
if (x * 2 == w) and (y * 2 == h):
    print(s, 1)
else:
    print(s, 0)

Buggy submission (verdict: Runtime Error):
w, h, x, y = map(int, input().split())

s = w * h / 2
if (x * 2 == w) and (y * 2 == h):
    print(s, 1)
else:
    print(s, 0)

Buggy submission (verdict: Runtime Error):
w, h, x, y = map(int, input().split())

s = w * h / 2
if (int(w / x) == 2) and (int(h / y) == 2):
    print(s, 1)
else:
    print(s, 0)
Problem p03000 (python)

Fixed submission:
n, x = map(int, input().split())
l = [int(i) for i in input().split()]
l.insert(0, 0)
d = 0
i = 0
while True:
    d += l[i]
    if d > x:
        break
    i += 1
    if i > n:
        break
print(i)

Buggy submission (verdict: Runtime Error):
n, x = map(int, input().split())
l = [int(i) for i in input().split()]
d = 0
i = 0
while (d <= x) and (i <= n):
    d += l[i]
    i += 1
print(i)

Buggy submission (verdict: Runtime Error):
n, x = map(int, input().split())
l = [int(i) for i in input().split()]
d = 0
i = 0
while d <= x:
    d += l[i]
    i += 1
    print('i:', i, 'd:', d)

print(i)
Problem p03001 (python)

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

s = w * h / 2
if (x * 2 == w) and (y * 2 == h):
    print(s, 1)
else:
    print(s, 0)

Buggy submission (verdict: Runtime Error):
w, h, x, y = map(int, input().split())

s = w * h / 2
if (int(w / x) == 2) and (int(h / y) == 2):
    print(s, 1)
else:
    print(s, 0)

Buggy submission (verdict: Runtime Error):
w, h, x, y = map(int, input().split())

s = w * h / 2
print(s)
if (int(w / x) == 2) and (int(h / y) == 2):
    print(1)
else:
    print(0)
Problem p02999 (python)

Fixed submission:
X,A = [int(x) for x in input().split()]
print(10 if X >= A else 0)

Buggy submission (verdict: Runtime Error):
X,A = [int(x) for x in input().split()]
print(10 if x >= A else 0)
Problem p02999 (python)

Fixed submission:
a,b =map(int,raw_input().split())
if a < b:
    print(0)
else:
    print(10)

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

if c == a/2 and d == b/2:
    print a*b*.5, 1
else:
    print a*b*.5, 0

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

if c == a/2 and d == b/2:
    print a*b/2, 1
else:
    print a*b/2, 0

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

if c == a/2 and d == b/2:
    print a*b/2,1
else:
    print a*b/2,0
Problem p03035 (python)

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

if n<=5:
    print(0)
elif n<=12:
    print(m/2)
else:
    print(m)

Buggy submission (verdict: Runtime Error):
n.m=map(int,raw_input().split())

if n<=5:
  print(0)
elif n<=12:
  print(m/2)
else:
  print(m)

Buggy submission (verdict: Runtime Error):
n,m=map(int,raw_input().split())

a=[]

a=map(int,raw_input().split())

b=[map(int,raw_input().split() )for i in range(m)]
b=sorted(b,key=lambda x: -x[1])
for i in range(m):
    a.sort()
    if a[0]>b[i][1]:
        break
    for j in range(b[i][0]):
        if a[j] < b[i][1]:
                a[j] = b[i][1]
        else:
           break
print(sum(a))
Problem p03246 (python)

Fixed submission:
n=input()
a=[]

a=map(int,raw_input().split())

b=[0]*100001
c=0
while c <= n-2:
    b[a[c]]+=1
    c+=2

d=[0]*100001
e=1
while e <= n-1:
    d[a[e]]+=1
    e+=2

f=sorted(b)[-2]
g=sorted(d)[-2]



if max(b) == n/2 and max(d) == n/2 and b.index(max(b)) == d.index(max(d)):
    print(n/2)
elif max(b) == n/2 and max(d) == n/2 and b.index(max(b)) != d.index(max(d)):
    print(0)
elif b.index(max(b)) == d.index(max(d)):
    print(n-max(b)-max(f,g))
else:
    print(n-max(b)-max(d))

Buggy submission (verdict: Runtime Error):
n=input()
a=[]

a=map(int,raw_input().split())

b=[0]*100000
c=0
while c <= n-2:
    b[a[c]]+=1
    c+=2

d=[0]*100000
e=1
while e <= n-1:
    d[a[e]]+=1
    e+=2

f=sorted(b)[-2]
g=sorted(d)[-2]



if max(b) == n/2 and max(d) == n/2 and b.index(max(b)) == d.index(max(d)):
    print(n/2)
elif max(b) == n/2 and max(d) == n/2 and b.index(max(b)) != d.index(max(d)):
    print(0)
elif b.index(max(b)) == d.index(max(d)):
    print(n-max(b)-max(f,g))
else:
    print(n-max(b)-max(d))

Buggy submission (verdict: Runtime Error):
n=input()
a=[]

a=map(int,raw_input().split())

b=[0]*100000
c=0
while c <= n-2:
    b[a[c]]+=1
    c+=2

d=[0]*100000
e=1
while e <= n-1:
    d[a[e]]+=1
    e+=2

f=sorted(b)[-2]
g=sorted(d)[-2]



if max(b) == n/2 and max(d) == n/2 and b.index(max(b)) == d.index(max(d)):
    print(n/2)
elif max(b) == n/2 and max(d) == n/2 and b.index(max(b)) != d.index(max(d)):
    print(0)
elif b.index(max(b)) == d.index(max(d)):
    print(n-max(b)-max(f,g))
else:
    print(n-max(b)-max(d))
~

Buggy submission (verdict: Runtime Error):
n=input()
a=[]

a=map(int,raw_input().split())

b=[0]*10000
c=0
while c <= n-2:
    b[a[c]]+=1
    c+=2

d=[0]*10000
e=1
while e <= n-1:
    d[a[e]]+=1
    e+=2

f=sorted(b)[-2]
g=sorted(d)[-2]



if max(b) == n/2 and max(d) == n/2 and b.index(max(b)) == d.index(max(d)):
    print(n/2)
elif max(b) == n/2 and max(d) == n/2 and b.index(max(b)) != d.index(max(d)):
    print(0)
elif b.index(max(b)) == d.index(max(d)):
    print(n-max(b)-max(f,g))
else:
    print(n-max(b)-max(d))
Problem p03852 (python)

Fixed submission:
mozi=input()
if mozi == 'a' or mozi == 'i' or mozi == 'u' or mozi == 'e' or mozi == 'o':
   print('vowel')
else:
   print('consonant')

Buggy submission (verdict: Runtime Error):
mozi=input()
if mozi == a or mozi == i or mozi == u or mozi == e or mozi == o:
   print('vowel')
else:
   print('consonant')

Buggy submission (verdict: Runtime Error):
mozi=input()
if mozi == a or mozi == i or mozi == u or mozi == e or mozi == o:
   print("vowel")
else:
   print("consonant")
Problem p03943 (python)

Fixed submission:
l = map(int,raw_input().split())
if l[0] == l[1] + l[2] or l[1] == l[0] + l[2] or l[2] == l[0] + l[1]:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
a,b,c = map(int,input().split())
if a == b + c or b == lc + a or c == a + b:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
l = map(int, input().split())
if l[0] == l[1] + l[2] or l[1] == l[0] + l[2] or l[2] == l[0] + l[1]:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
l = map(int, input().split())
if l[0] == l[1] + l[2] or l[1] == l[0] + l[2] or l[2] == l[0] + l[1]:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
l = map(int, raw_input().split())
if l[0] == l[1] + l[2] or l[1] == l[0] + l[2] or l[2] == l[0] + l[1]:
  print('Yes')
else:
  print('No')
Problem p03997 (python)

Fixed submission:
a = []
for i in range(3):
   a.append(input())
print((a[0] + a[1]) * a[2] / 2)

Buggy submission (verdict: Runtime Error):
a = []
for i in range(3):
   a.append(input())
print((a[0] + a[1]) * a[2] / 2)
Problem p04029 (python)

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

Buggy submission (verdict: Runtime Error):
a = input()
print(a * (a + 1)/2)
Problem p03455 (python)

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

Buggy submission (verdict: Runtime Error):
a,b=input().split()
if a*b % 2 == 0:
  print('Even')
else:
  print('Odd')
Problem p03457 (python)

Fixed submission:
prev_t = 0
prev_x = 0
prev_y = 0

n = int(input())
ans = True
for _ in range(n):
    t, x, y = map(int, input().split())
    dist = (x - prev_x) + (y - prev_y)
    time = t - prev_t
    if dist > time or dist % 2 != time % 2:
        ans = False
        break

    prev_x = x
    prev_y = y
    prev_t = t

if not ans:
    print('No')
else:
    print('Yes')

Buggy submission (verdict: Runtime Error):
prev_t = 0
prev_x = 0
prev_y = 0

n = int(input())
for _ in range(n):
  t, x, y = map(int, input().split())
  dist = (x - prev_x) + (y - prev_y)
  time = t - prev_t
  if dist != time:
    ans = False
    break
  
  prev_x = x
  prev_y = y
  prev_t = t
    
if not ans:
  print('No')
else:
  print('Yes')
Problem p03773 (python)

Fixed submission:
#!/usr/bin/env python3
a, b = map(int, input().split())
print((a+b) % 24)

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3
# input
n, m = map(int, input().split())
persons = []
checks = []
for i in range(n):
    point = tuple(map(int, input().split()))
    persons.append(point)
for i in range(m):
    point = tuple(map(int, input().split()))
    checks.append(point)

# print(persons)
# print(checks)
    
def get_distance(person, check):
    return abs(person[0] - check[0]) + abs(person[1] - check[1])
    
for i in range(n):
    min_distance = 10 ** 10
    min_distance_point_num = -1

    # calculate min distance from n to each m
    for j in range(m):
        distance = get_distance(persons[i], checks[j])
        if distance < min_distance:
            min_distance = distance
            min_distance_point_num = j + 1

    print(min_distance_point_num)

Buggy submission (verdict: Runtime Error):
#!/usr/bin/evn python3
# input
n, m = map(int, input().split())
persons = []
checks = []
for i in range(n):
    point = tuple(map(int, input().split()))
    persons.append(point)
for i in range(m):
    point = tuple(map(int, input().split()))
    checks.append(point)

# print(persons)
# print(checks)
    
def get_distance(person, check):
    return abs(person[0] - check[0]) + abs(person[1] - check[1])
    
for i in range(n):
    min_distance = 10 ** 10
    min_distance_point_num = -1

    # calculate min distance from n to each m
    for j in range(m):
        distance = get_distance(persons[i], checks[j])
        if distance < min_distance:
            min_distance = distance
            min_distance_point_num = j + 1

    print(min_distance_point_num)
Problem p03795 (python)

Fixed submission:
#!/usr/bin/env python3
n = int(input())
x = n * 800
y = (n // 15) * 200
ans = x - y
print(ans)

Buggy submission (verdict: Runtime Error):
s_num, c_num = map(int, input().split())
if s_num * 2 > c_num:
    print(s_num)
else:
    ans = s_num
    c_num -= s_num * 2
    ans += c_num // 4
    print(ans)
Problem p02999 (python)

Fixed submission:
X, A = map(int, input().split())
if X < A:
  print(0)
else:
  print(10)

Buggy submission (verdict: Runtime Error):
N, X = map(int, input().split())
A = list(map(int, input().split()))
cnt = 0
ans = 0
for i in A:
  ans += i
  if ans <= X:
    cnt += 1    
print(cnt)
Problem p03076 (python)

Fixed submission:
l = []
for i in range(5):
  l.append(input())

ans = 0
min_val = 99
flag = False

for i in range(5):
  if l[i][-1] == "0":
    ans += int(l[i])
  else:
    if int(l[i][-1]) <= int(str(min_val)[-1]):
      if flag:
        ans += (-(-int(min_val)//10))*10
      flag = True
      min_val = l[i]
    else:
      ans += (-(-int(l[i])//10))*10
if flag:
  ans += int(min_val)
print(ans)

Buggy submission (verdict: Runtime Error):
l = []
for i in range(5):
  l.append(input())

ans = 0
if int(l[0][-1]) <= int(l[1][-1]):
  min_val = l[0]
  ans += (-(-int(l[1])//10))*10
else:
  min_val = l[1]
  ans += (-(-int(l[0])//10))*10
  
for i in range(2, 5):
  if min_val[-1] <= int(l[i][-1]):
    ans += (-(-int(l[i])//10))*10
  else:
    ans += (-(-min_val//10))*10
    min_val = l[i]
    
ans += (-(-min_val//10))*10
print(ans)
Problem p03085 (python)

Fixed submission:
b = input()

if b == "A":
  print("T")
elif b == "T":
  print("A")
elif b == "C":
  print("G")
elif b == "G":
  print("C")

Buggy submission (verdict: Runtime Error):
N, Q = map(int, input().split())
data = input()
result = [0] * N
for i in range(N-1):
  if data[i] == "A" and data[i+1]:
    result[i+1] = result[i] + 1
  else:
    result[i+1] = result[i

for i in range(Q):
  l, r = map(int, input().split())
  print(result[r-1]-result[l-1])
Problem p03086 (python)

Fixed submission:
S = input()
ans = 0
count = 0


for i in S:
    if i =="A" or i == "C" or i == "T" or i == "G":
        count += 1
    else:
        ans = max(count, ans)
        count = 0
        
ans = max(count, ans)
print(ans)

Buggy submission (verdict: Runtime Error):
ans = 0
count = 0


for i in S:
    if i =="A" or i == "C" or i == "T" or i == "G":
        count += 1
    else:
        ans = max(count, ans)
        count = 0
        
ans = max(count, ans)
print(ans)