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

Fixed submission:
h, w = map(int, input().split())
def calculate_t(x, y):
    min_d = 1e12
    for i in range(x):
        s1 = (y//2)*i
        s2 = y*(x-i)
        s3 = (y-y//2)*i
        min_d = min(min_d, max(s1,s2,s3) - min(s1,s2,s3))
    return min_d
def calculate_3(x, y):
    min_d = 1e12
    for i in range(x):
        w1 = i
        w2 = (x-i)//2
        w3 = x - w1 -w2
        min_d = min(min_d, (max(w1,w2,w3)-min(w1,w2,w3))*y)
    return min_d
if (h*w)%3 == 0:
    print(0)
else:
    d1 = calculate_t(h,w)
    d2 = calculate_t(w,h)
    d3 = calculate_3(h,w)
    d4 = calculate_3(w,h)
    print(min(d1,d2,d3,d4))

Buggy submission (verdict: Runtime Error):
h, w = map(int, input().split())
def calculate_t(x, y):
    min_d = 1e12
    for i in range(x):
        s1 = (y//2)*i
        s2 = y*(x-i)
        s3 = (y-y//2)*i
        min_d = min(min_d, max(s1,s2,s3) - min(s1,s2,s3))
    return min_d
def calculate_3(x, y):
    for i in range(x):
        w1 = i
        w2 = (x-i)//2
        x3 = x - w1 -w2
        return min(w1, w2, w3)*y
if (h*w)%3 == 0:
    print(0)
else:
    d1 = calculate_t(h,w)
    d2 = calculate_t(w,h)
    d3 = calculate_3(h,w)
    d4 = calculate_3(w,h)
    print(min(d1,d2,d3,d4))

Buggy submission (verdict: Runtime Error):
h, w = map(int, input().split())
if h%3 == 0 or w%3 ==0:
    print(0)
else:
    def calculate_t(x, y):
        d = h*w + 1
        i = x//2
        s1, s2 = 0, d
        rng = range(x) if x < 1000 else range(x//3, x*4//5)
        new_d = h*w
        for i in rng:
            s1 = (y//2)*i
            s2 = y*(x-i)
            s3 = (y-y//2)*i
            new_d = max(s1,s2,s3)- min(s1,s2,s3)
            if d > new_d:
                d = new_d
                continue
            else:
                break
        return d
    def calculate_3(x, y):
        h1 = y//3
        h2 = y//3 + y%3
        return x*(h2-h1)
    
    if h == w:
        print(min(d1,d2))
    else:
        d3 = calculate_t(w, h)
        d4 = calculate_3(w, h)
        print(min(d1,d2,d3,d4))

Buggy submission (verdict: Runtime Error):
h, w = map(int, input().split())
if h%3 == 0 or w%3 ==0:
    print(0)
else:
    def calculate_d(x, y):
        d = h*w + 1
        i = x//2
        s1, s2 = 0, d
        for i in range(x):
            s1 = (y//2)*i
            s2 = y*(x-i)
            s3 = (y-y//2)*i
            new_d = max(abs(s1-s2), abs(s1-s3))
            if s1 < s2:
                i = 
            if d > new_d:
                d = new_d
                continue
            else:
                break
        return d
    d1 = calculate_d(h, w)
    d2 = calculate_d(w, h)
    print(min(d1,d2))
Problem p03694 (python)

Fixed submission:
N=raw_input()
a=raw_input().split()
a=map(int,a)
import numpy as np
ans=np.abs(np.max(a)-np.min(a))
print(ans)

Buggy submission (verdict: Runtime Error):
N=raw_input()
a=raw_input().split()

import numpy as np
ans=np.abs(np.max(a)-np.min(a))
print(ans)
Problem p03693 (python)

Fixed submission:
a, b, c = map(int, raw_input().split())
if (a * 100 + b * 10 + c) % 4 == 0:
    print "YES"
else:
    print "NO"

Buggy submission (verdict: Runtime Error):
N = int(raw_input())
a = map(int, raw_input().split())
mx = max(a)
mn = min(a)
print mx - mn

Buggy submission (verdict: Runtime Error):
a, b, c = = map(int, raw_input().split())
if (a * 100 + b * 10 + c) % 4 == 0:
    print "yes"
else:
    print "no"
Problem p03693 (python)

Fixed submission:
r, g, b = map(int, input().split())
 
rgb = int(r*100 + g*10 + b)
 
if rgb % 4 == 0:
  print('YES')
else:
  print('NO')

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

rgb = int(r*100 + g*10 + b)

if rgb % 4 == 0:
  print('YES)
else:
  print('NO)
Problem p04029 (python)

Fixed submission:
n = int(input())
i = 1
sum = 0
for i in range(1,n + 1):
  sum += i
print(sum)

Buggy submission (verdict: Runtime Error):
#include<stdio.h>
int main(void){
  int n,sum = 0;
  scanf("%d",&n);
  for(n;n >= 1;n--) sum += n;
  printf(sum);
  return 0;
}

Buggy submission (verdict: Runtime Error):
n = int(input())
i = 1
sum = 0
for i in range(1,n){
  sum += i
}
print i

Buggy submission (verdict: Runtime Error):
n = int(input())
i = 1
sum = 0
for i in range(1,n){
  sum += i
}
print i

Buggy submission (verdict: Runtime Error):
n = int(input())
i = 1
sum = 0
for i in range(1,n){
  sum += i
print i
Problem p03693 (python)

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

if (g*10 + b) % 4 == 0:
    print("YES")
else:
    print("NO")

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

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

color = [0] * 8
free = 0

a = 400 
    
for i in range(0,N):
    if rate[i] < a:
        color[0] = 1
    elif a <= rate[i] < 2*a:
        color[1] = 1
    elif 2*a <= rate[i] < 3*a:
        color[2] = 1
    elif 3*a <= rate[i] < 4*a:
        color[3] = 1
    elif 4*a <= rate[i] < 5*a:
        color[4] = 1
    elif 5*a <= rate[i] < 6*a:
        color[5] = 1
    elif 6*a <= rate[i] < 7*a:
        color[6] = 1
    elif 7*a <= rate[i] < 8*a:
        color[7] = 1
    elif 8*a <= rate[i]:
        free += 1
        

min_color = 0
max_color = 0

print( max(color.count(1),1), color.count(1) + free)

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

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

color = [0] * 9

a = 400 
flag = 1
    
for i in range(0,N):
    if 8*a <= rate[i]:
        color[8] += 1
    else:
        flag = 0
        if rate[i] < a:
            color[0] = 1
        elif a <= rate[i] < 2*a:
            color[1] = 1
        elif 2*a <= rate[i] < 3*a:
            color[2] = 1
        elif 3*a <= rate[i] < 4*a:
            color[3] = 1
        elif 4*a <= rate[i] < 5*a:
            color[4] = 1
        elif 5*a <= rate[i] < 6*a:
            color[5] = 1
        elif 6*a <= rate[i] < 7*a:
            color[6] = 1
        elif 7*a <= rate[i] < 8*a:
            color[7] = 1

min_color = 0
max_color = 0


min_color = color.count(1)
max_color = min_color + color[8]
if max_color >= 8:
    max_color = 8

print(min_color,max_color)
Problem p03695 (python)

Fixed submission:
N = int(input())

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

color = [0] * 8

a = 400 
free = 0
    
for i in range(0,N):
    if rate[i] < a:
        color[0] = 1
    elif a <= rate[i] < 2*a:
        color[1] = 1
    elif 2*a <= rate[i] < 3*a:
        color[2] = 1
    elif 3*a <= rate[i] < 4*a:
        color[3] = 1
    elif 4*a <= rate[i] < 5*a:
        color[4] = 1
    elif 5*a <= rate[i] < 6*a:
        color[5] = 1
    elif 6*a <= rate[i] < 7*a:
        color[6] = 1
    elif 7*a <= rate[i] < 8*a:
        color[7] = 1
    elif 8*a <= rate[i]:
        free += 1
        

min_color = 0
max_color = 0

min_color = color.count(1)
max_color = min_color + free

print( max(min_color,1), max_color)

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

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

color = [0] * 8

a = 400 
free = 0
    
for i in range(0,N):
    if rate[i] < a:
        color[0] = 1
    elif a <= rate[i] < 2*a:
        color[1] = 1
    elif 2*a <= rate[i] < 3*a:
        color[2] = 1
    elif 3*a <= rate[i] < 4*a:
        color[3] = 1
    elif 4*a <= rate[i] < 5*a:
        color[4] = 1
    elif 5*a <= rate[i] < 6*a:
        color[5] = 1
    elif 6*a <= rate[i] < 7*a:
        color[6] = 1
    elif 7*a <= rate[i] < 8*a:
        color[7] = 1
    elif 8*a <= rate[i]:
        free += 1
        

min_color = 0
max_color = 0

min_color = color.count(1)
max_color = min_color + color[8]

print( max(min_color,1), max_color)

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

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

color = [0] * 9

a = 400 
flag = 1
    
for i in range(0,N):
    if 8*a <= rate[i]:
        color[8] += 1
    else:
        flag = 0
        if rate[i] < a:
            color[0] = 1
        elif a <= rate[i] < 2*a:
            color[1] = 1
        elif 2*a <= rate[i] < 3*a:
            color[2] = 1
        elif 3*a <= rate[i] < 4*a:
            color[3] = 1
        elif 4*a <= rate[i] < 5*a:
            color[4] = 1
        elif 5*a <= rate[i] < 6*a:
            color[5] = 1
        elif 6*a <= rate[i] < 7*a:
            color[6] = 1
        elif 7*a <= rate[i] < 8*a:
            color[7] = 1

min_color = 0
max_color = 0


min_color = color.count(1)
max_color = min_color + color[8]
if max_color > = 8:
    max_color = 8

print(min_color,max_color)
Problem p03711 (python)

Fixed submission:
x, y = map(int,input().split())
A = [1,3,5,7,8,10,12]
B = [4,6,9,11]
C = [2]
if x in A:
    X = 'A'
if x in B:
    X = 'B'
if x in C:
    X = 'C'
if y in A:
    Y = 'A'
if y in B:
    Y = 'B'
if y in C:
    Y = 'C'
print('Yes' if X==Y else 'No')

Buggy submission (verdict: Runtime Error):
x, y = map(int,input().split())
A = [1,3,5,7,8,10,12]
B = [4,6,9,11]
C = [2]
if x in A:
    X = 'A'
if x in B:
    X = 'B'
if x in A:
    X = 'C'
if y in A:
    Y = 'A'
if y in B:
    Y = 'B'
if y in A:
    Y = 'C'
print('Yes' if X==Y else 'No')
Problem p03738 (python)

Fixed submission:
A = input()
B = input()

import sys
if len(A)>len(B):
    print('GREATER')
    sys.exit()
elif len(A)<len(B):
    print('LESS')
    sys.exit()
else:
    for a,b in zip(A,B):
        if int(a)>int(b):
            print('GREATER')
            sys.exit()
        elif int(a)<int(b):
            print('LESS')
            sys.exit()
print('EQUAL')

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())

import sys
if len(str(A))>len(str(B)):
    print('GREATER')
    sys.exit()
elif len(str(A))<len(str(B)):
    print('LESS')
    sys.exit()
else:
    for a,b in zip(A,B):
        if a>b:
            print('GREATER')
            sys.exit()
        elif a<b:
            print('LESS')
            sys.exit()
print('EQUAL')
Problem p03760 (python)

Fixed submission:
O = input()
E = input()
res = ''
for i in range(len(E)):
    res += O[i] + E[i]
if len(O)>len(E):
    res += O[-1]
print(res)

Buggy submission (verdict: Runtime Error):
O = input()
E = input()
res = ''
for i in range(len(O)):
    res += O[i] + E[i]
if len(O)>len(E):
    res += O[-1]
print(res)
Problem p03998 (python)

Fixed submission:
sa = input()
sb = input()
sc = input()

def judges(lis):
    if lis[0] == 'a':
        judge=1
    elif lis[0] == 'b':
        judge=2
    else:
        judge=3
    return judge

import sys

judge = 1
while(1):
    if judge == 1:
        try:
            judge = judges(sa)
            sa = sa[1:]
        except IndexError:
            print('A')
            break
    
    elif judge == 2:
        try:
            judge = judges(sb)
            sb = sb[1:]
        except IndexError:
            print('B')
            break
    else:
        try:
            judge = judges(sc)
            sc = sc[1:]
        except IndexError:
            print('C')
            break

Buggy submission (verdict: Runtime Error):
sa = input()
sb = input()
sc = input()

def judges(lis):
    if lis[0] == 'a':
        judge=1
    elif lis[0] == 'b':
        judge=2
    else:
        judge=3
    return judge
  
  import sys

judge = 1
while(1):
    if judge == 1:
        try:
            judge = judges(sa)
            sa = sa[1:]
            print(sa)
        except IndexError:
            print('A')
            break
    
    elif judge == 2:
        try:
            judge = judges(sb)
            sb = sb[1:]
            print(sb)
        except IndexError:
            print('B')
            break
    else:
        try:
            judge = judges(sc)
            sc = sc[1:]
            print(sc)
        except IndexError:
            print('C')
            break
Problem p03693 (python)

Fixed submission:
# -*- coding: utf-8 -*-
a, b, c = map(int, raw_input().split())
# 出力
if (a*100+b*10+c)%4 ==0:
    print "YES"
else:
    print "NO"

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# 整数の入力
a = int(raw_input())
# スペース区切りの整数の入力
a, b, c = map(int, raw_input().split())
# 出力
if 100*a+10*b+c%4 == 0:
	print "YES"
Problem p03693 (python)

Fixed submission:
r,g,b=map(int,input().split())
if (10*g+b)%4==0:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
r,g,b=input()
a=(100*int(r)+10*int(g)+int(b))%4
if a==0:
    print("YES")
else:
    print("NO")
Problem p03693 (python)

Fixed submission:
l = input().split()
n = int("".join(l))

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

Buggy submission (verdict: Runtime Error):
l = input().split()
n = int(l.join())

if n%4 == 0:print("Yes")
else:print("No")
Problem p03813 (python)

Fixed submission:
n = input()
n = int(n)
if n < 1200:
 print("ABC")
else:
 print("ARC")

Buggy submission (verdict: Runtime Error):
n = input()
if n<1200:
 print("ABC")
else:
 print("SRC")
Problem p03737 (python)

Fixed submission:
a = map(str,raw_input().split())
#a = int(raw_input())

print a[0][0].upper() + a[1][0].upper() + a[2][0].upper()

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

print a[0][0].upper + a[1][0].upper + a[2][0].upper
Problem p03997 (python)

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

Buggy submission (verdict: Runtime Error):
    a = input()
    b = input()
    h = input()
    print (a+b)*h/2
Problem p04033 (python)

Fixed submission:
a,b = map(int, raw_input().split())
if a < 0 and b < 0:
	if (b - a)%2 == 1:
		print "Positive"
	else:
		print "Negative"
elif a * b <= 0: 
	print "Zero"
else:
	print "Positive"

Buggy submission (verdict: Runtime Error):
a,b = map(int, raw_input().split())
c = 1
for i in range(a,b+1):
	c = c * i 

if c < 0:
	print "Negative"
elif c == 0:
	print "Zero"
else:
	print "Positive"
Problem p03711 (python)

Fixed submission:
group1 = [1, 3, 5, 7, 8, 10, 12]
group2 = [4, 6, 9, 11]
group3 = [2]

input = list(map(int, input().split()))
input_x = int(input[0])
input_y = int(input[1])

exist_group1 = group1.count(input_x) + group1.count(input_y)
exist_group2 = group2.count(input_x) + group2.count(input_y)
exist_group3 = group3.count(input_x) + group3.count(input_y)

if exist_group1 == 2 or exist_group2 == 2 or exist_group3 == 2:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
import sys

group1 = [1, 3, 5, 7, 8, 10, 12]
group2 = [4, 6, 9, 11]
group3 = [2]

input_x = int(sys.argv[1])
input_y = int(sys.argv[2])

exist_group1 = group1.count(input_x) + group1.count(input_y)
exist_group2 = group2.count(input_x) + group2.count(input_y)
exist_group3 = group3.count(input_x) + group3.count(input_y)

if exist_group1 == 2 or exist_group2 == 2 or exist_group3 == 2:
    print("Yes")
else:
    print("No")
Problem p03773 (python)

Fixed submission:
A, B = map(int, input().split())
print((A + B) % 24)

Buggy submission (verdict: Runtime Error):
def calcManhattanDistance(student, checkpoint):
    return abs(student[0] - checkpoint[0]) + abs(student[1] - checkpoint[1])


if __name__ == "__main__":
    # input process
    N, M = map(int, input().split())
    students = [list(map(int, input().split())) for i in range(N)]
    checkpoints = [list(map(int, input().split())) for i in range(M)]

    # calculation process
    for student in students:
        distance_list = []

        for checkpoint in checkpoints:
            distance_list.append(calcManhattanDistance(student, checkpoint))

        # print the first index(+1) of minimum value
        minval = min(distance_list)
        print(distance_list.index(minval) + 1)

    # END
Problem p03693 (python)

Fixed submission:
r,g,b = map(int,input().split())
x = r*100 + g*10 + b
if x%4 == 0:
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
#入力
N = int(input())
a_list = []
a_list = list(map(int,input().split()))

#変数を用意
g_list = [0]*9

#グループ1の要素があるか確認
for i in range(N):
    if 1 <= a_list[i] <= 399:
        g_list[0] = 1
        break

#グループ2から8の要素があるか確認
for j in range(1,8):
    for k in range(N):
        if 400*j <= a_list[k] <= (400*(j+1)-1):
            g_list[j] = 1
            break

#グループ1から8の要素数をgに代入
g = 0
for m in range(8):
    g += g_list[m] 

#グループ9の要素がいくつあるか数える
g_list[8] = 0
for l in range(N):
    if a_list[l] >= 3200:
        g_list[8] += 1

#条件分岐して数える
if g_list[8]==0:
    print(g,g)

elif g==0:
    if g_list[8] >= 8:
        print(1,8)
    else:
        print(1,g_list[8])

elif g==8:
    print(8,8)
    
else:
    if g + g_list[8] >=8:
        print(g,8)
    else:
        print(g,g+g_list[8])
Problem p03719 (python)

Fixed submission:
A,B,C = map(int,input().split())
if C >= A and C<= B:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
N,K = map(int,input().split())
list1 = []
for i in range(N):
    list1.append(list(map(int,input().split())))
list1.sort()
list2 = []
for j in range(N):
    list2 += [list1[j][0]]*list1[j][1]
    if len(list2) >= K:
        break
print(list2[K-1])

Buggy submission (verdict: Runtime Error):
#N,Mとa_1からb_Mまで入力
N,M = map(int,input().split())
list1 = [input() for i in range(1,2M+1)]
for i in range(M):
    list1.append(map(int,input() .split()))
    
#print list.count(l) for文で0から2M-1まで
for l in range(1,N+1):
    print(list1.count(l))
Problem p03697 (python)

Fixed submission:
#!/usr/bin/env python
# _*_ coding: utf-8 _*_
a = input()
a.split()
a.split()[1]

A = int(a.split()[0])
B = int(a.split()[1])

sum = A + B

if sum < 10:
    print(sum)

elif sum >= 10:
    print("error")

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python
# _*_ coding utf-8 _*_

A = int(input())
B = int(input())

sum = A + B

if sum <= 10:
    print(sum)

elif sum > 10:
    print("error")
Problem p03693 (python)

Fixed submission:
a=input().split()
b=int(a[0])*100+int(a[1])*10+int(a[2])
if b%4==0:
 print("YES")
else:
 print("NO")

Buggy submission (verdict: Runtime Error):
import numpy as np
n=input()
n=int(n)
a=input().split()
b=np.zeros(n)
div=0
num_8=0
for i in range(n):
 a[i]=int(a[i])
 if a[i]<=399 and a[i]>=1:
  b[i]=0
 elif a[i]>=400 and a[i]<=799:
  b[i]=1
 elif a[i]>=800 and a[i]<=1199:
  b[i]=2
 elif a[i]>=1200 and a[i]<=1599:
  b[i]=3
 elif a[i]>=1600 and a[i]<=1999:
  b[i]=4
 elif a[i]>=2000 and a[i]<=2399:
  b[i]=5
 elif a[i]>=2400 and a[i]<=2799:
  b[i]=6
 elif a[i]>=2800 and a[i]<=3199:
  b[i]=7
 else:
  b[i]=8
  num_8=num_8+1
for i in range(8):
 if i in b:
  div=div+1
min=div
max=div+num_8
if min==0:
 min=1
print(min,max)

Buggy submission (verdict: Runtime Error):
import numpy as np
n=input()
n=int(n)
a=input().split()
b=np.zeros(n)
div=0
num_8=0
for i in range(n):
 a[i]=int(a[i])
 if a[i]<=399 and a[i]>=1:
  b[i]=0
 elif a[i]>=400 and a[i]<=799:
  b[i]=1
 elif a[i]>=800 and a[i]<=1199:
  b[i]=2
 elif a[i]>=1200 and a[i]<=1599:
  b[i]=3
 elif a[i]>=1600 and a[i]<=1999:
  b[i]=4
 elif a[i]>=2000 and a[i]<=2399:
  b[i]=5
 elif a[i]>=2400 and a[i]<=2799:
  b[i]=6
 elif a[i]>=2800 and a[i]<=3199:
  b[i]=7
 else:
  b[i]=8
  num_8=num_8+1
for i in range(8):
 if i in b:
  div=div+1
min=div
max=div+num_8
if min==0:
 min=1
print(min,max)
Problem p03695 (python)

Fixed submission:
import numpy as np
n=input()
n=int(n)
a=input().split()
b=np.zeros(n)
div=0
num_8=0
for i in range(n):
 a[i]=int(a[i])
 if a[i]<=399 and a[i]>=1:
  b[i]=0
 elif a[i]>=400 and a[i]<=799:
  b[i]=1
 elif a[i]>=800 and a[i]<=1199:
  b[i]=2
 elif a[i]>=1200 and a[i]<=1599:
  b[i]=3
 elif a[i]>=1600 and a[i]<=1999:
  b[i]=4
 elif a[i]>=2000 and a[i]<=2399:
  b[i]=5
 elif a[i]>=2400 and a[i]<=2799:
  b[i]=6
 elif a[i]>=2800 and a[i]<=3199:
  b[i]=7
 else:
  b[i]=8
  num_8=num_8+1
for i in range(8):
 if i in b:
  div=div+1
min=div
max=div+num_8
if min==0:
 min=1
print(min,max)

Buggy submission (verdict: Runtime Error):
    import numpy as np
    n=input()
    n=int(n)
    a=input().split()
    b=np.zeros(n)
    div=0
    num_8=0
    for i in range(n):
     a[i]=int(a[i])
     if a[i]<=399 and a[i]>=1:
      b[i]=0
     elif a[i]>=400 and a[i]<=799:
      b[i]=1
     elif a[i]>=800 and a[i]<=1199:
      b[i]=2
     elif a[i]>=1200 and a[i]<=1599:
      b[i]=3
     elif a[i]>=1600 and a[i]<=1999:
      b[i]=4
     elif a[i]>=2000 and a[i]<=2399:
      b[i]=5
     elif a[i]>=2400 and a[i]<=2799:
      b[i]=6
     elif a[i]>=2800 and a[i]<=3199:
      b[i]=7
     else:
      b[i]=8
      num_8=num_8+1
    for i in range(8):
     if i in b:
      div=div+1
    min=div
    max=div+num_8
    if min==0:
     min=1
    print(min,max)

Buggy submission (verdict: Runtime Error):
    import numpy as np
    n=input()
    n=int(n)
    a=input().split()
    b=np.zeros(n)
    div=0
    num_8=0
    for i in range(n):
     a[i]=int(a[i])
     if a[i]<=399 and a[i]>=1:
      b[i]=0
     elif a[i]>=400 and a[i]<=799:
      b[i]=1
     elif a[i]>=800 and a[i]<=1199:
      b[i]=2
     elif a[i]>=1200 and a[i]<=1599:
      b[i]=3
     elif a[i]>=1600 and a[i]<=1999:
      b[i]=4
     elif a[i]>=2000 and a[i]<=2399:
      b[i]=5
     elif a[i]>=2400 and a[i]<=2799:
      b[i]=6
     elif a[i]>=2800 and a[i]<=3199:
      b[i]=7
     else:
      b[i]=8
      num_8=num_8+1
    for i in range(8):
     if i in b:
      div=div+1
    min=div
    max=div+num_8
    if min==0:
     min=1
    print(min,max)
Problem p03993 (python)

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

b = {}
ans = 0
for i, v in enumerate(a):
    if v > i+1:
        b[i+1] = v
    elif v < i+1:
        if v in b and b[v] == i+1:
            ans += 1
print(ans)

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

b = {}
ans = 0
for i, v in enumerate(a):
    if v > i+1:
        b[i+1] = v
    elif v < i+1:
        if b[v] == i+1:
            ans += 1
print(ans)
Problem p03719 (python)

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

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

if c>=a and c<=b:
    print ("Yes")
else:
    print("No")

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

N, K = map(int,input().split())

A = []

while True:
    a, b = map(int,input().split())
    B = [a for j in range(b)]
    A.extend(B)
    if len(A) >= K:
        print(A[K-1])
        break
Problem p03720 (python)

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

N, M = map(int,input().split())

street = [0 for i in range(N)]

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

for s in street:
    print(s)

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

N, M = map(int,input().split())

street = []

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

for i in range(0,N):
    print(street[i])

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

N, M = map(int,input().split())

street = []

for i in range(0,M):
    street.append(0)

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

for i in range(0,N):
    print(street[i])

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

N, M = map(int,input().split())

street = []

for i in range(0,M):
    street.append(0)

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

for i in range(0,N):
    print(street[i])
Problem p03694 (python)

Fixed submission:
N = int(input())
a = list(map(int,input().split()))
print(max(a) - min(a))

Buggy submission (verdict: Runtime Error):
N = int(input())
a = list(append(map(int,input().split)))
print(max(a) - min(a))
Problem p03829 (python)

Fixed submission:
N, A, B = map(int,input().split());
X = list(map(int,input().split()));

dist =[X[i+1]-X[i] for i in range(N-1)];

fatigue = 0;
for i in dist:
    if i*A<B:
        fatigue += i*A;
    else:
        fatigue += B;

print(fatigue);

Buggy submission (verdict: Runtime Error):
N, A, B = map(int,input().split());
X[N] = map(int,input().split);

for i in range(N-1):
    dist[i] = X[i+1]-X[i];

fatigue = 0;
for i in dist:
    if i*A<B:
        fatigue += i * A;
    else:
        fatigue += B;

print(fatigue);