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

Fixed submission:
import math

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors

def is_prime(n):
    if n == 1: return True

    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False

    return True

A, B = map(int, input().split())
AY = make_divisors(A)
BY = make_divisors(B)
AB = set(AY) & set(BY)
AB = list(AB)
cnt = [i for i in range(len(AB)) if is_prime(AB[i])]
print(len(cnt))

Buggy submission (verdict: Runtime Error):
def cf(x1,x2):
    cf=[]
    for i in range(1,min(x1,x2)+1):
        if x1 % i == 0 and x2 % i == 0:
            cf.append(i)
    return cf

def is_prime(n):
    if n == 1: return True

    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False

    return True

A, B = map(int, input().split())
lst = cf(A,B)

res = len([i for i in lst if is_prime(i)])

print(res)
Problem p02995 (python)

Fixed submission:
from fractions import gcd

def lcm(x, y):
    return (x * y) // gcd(x, y)

A,B,C,D = map(int,input().split())

ab1 = B // C -  (A-1) // C
ab2 = B // D -  (A-1) // D

lcd = lcm(C,D)

ab3 = B//lcd - (A-1)//lcd

ans = (B-A+1) - (ab1+ab2-ab3)

print(ans)

Buggy submission (verdict: Runtime Error):
import math
import numpy as np
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

A, B, C, D = map(int,input().split(' '))

# arr = np.linspace(A,B,1)
a1 = A-1 // C
a2 = A-1 // D

b1 = B // C
b2 = B // D 

ab1 = b1 - a1
ab2 = b2 - a2


lc = lcm(C,D)

a3 = A // lc
b3 = B // lc
ab3 = b3 - a3
res = ab1 + ab2 - ab3
print(abs(A-B)-res)

Buggy submission (verdict: Runtime Error):
import math
import numpy as np
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

A, B, C, D = list(map(int,input().split(' ')))

# arr = np.linspace(A,B,1)
a1 = A // C
a2 = A // D

b1 = B // C
b2 = B // D 

ab1 = b1 - a1
ab2 = b2 - a2
if A % C == 0 and B % C == 0:
    ab1+=1
if A % D == 0 and B % D == 0:
    ab2+=1

lc = lcm(C,D)
a3 = A // lc
b3 = B // lc
ab3 = b3 - a3
res = ab1 + ab2 - ab3
print(abs(A-B)-res)

Buggy submission (verdict: Runtime Error):
import math
import numpy as np
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

A, B, C, D = list(map(int,input().split(' ')))

arr = np.arange(A,B+1,1)

a1 = A // C
a2 = A // D

b1 = B // C
b2 = B // D 

ab1 = b1 - a1
ab2 = b2 - a2

if A % C  == 0 and B % C == 0:
    ab1 += 1
if A % D  == 0 and B % D == 0:
    ab2 += 1
lc = lcm(C,D)
a3 = A // lc
b3 = B // lc
ab3 = b3 - a3
res = ab1 + ab2 - ab3

print(len(arr)- res)
Problem p03351 (python)

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

if abs(a-b) <= d and abs(b-c) <= d or abs(a-c) <= d:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
if a <= b <= a+d and b <= c <= b+d or a <= c <= a+d:
    print('Yes')
else:
    print('No')
Problem p04043 (python)

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

if sum(ABC) == 17:
    print('YES')
else:
    print('NO')

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

if A+B+C is not 17:
    print('NO')
    exit(1)

print('YES')
Problem p02687 (python)

Fixed submission:
s=input()
if s=="ABC":
  print("ARC")
else:
  print("ABC")

Buggy submission (verdict: Runtime Error):
x=int(input())
a=0
b=0
for i in range(500):
  for j in range(-1000,1000):
    if i**5-j**5==x:
       a=i
       b=j
       break
print(a,b)
Problem p02690 (python)

Fixed submission:
x=int(input())
a=0
b=0
for i in range(500):
  for j in range(-1000,1000):
    if i**5-j**5==x:
       a=i
       b=j
       break
print(a,b)

Buggy submission (verdict: Runtime Error):
x=int(input())
for b in range(-10000,10000):
    a=(x+b**5)**0.2
    if a.is_integer():
        print(a,b)
        exit()
Problem p02714 (python)

Fixed submission:
n=int(input())
s=input()
ans=s.count("R")*s.count("G")*s.count("B")
for i in range(n):
  for j in range(i,n):
    if 2*j-i>=n:
      break
    else:
      if s[i]!=s[j]!=s[2*j-i]!=s[i]:
        ans-=1
print(ans)

Buggy submission (verdict: Runtime Error):
n=int(input())
s=input()
ans=s.count('R')*s.count('G')*s.count('B')    
for i in range(n):
    for j in range(i+1,n):
        k=2*j-i
        if k>=n:
            break
        if s[i]!= s[j] and s[i]!=s[k] and s[i+j]!= s[k] :
            ans-=1
print(ans)

Buggy submission (verdict: Runtime Error):
n=int(input())
s=input()
ans=s.count('R')*s.count('G')*s.count('B')    
for i in range(n):
    for j in range(i+1,n):
        k=2*j-i
        if k>=n:
            break
        if s[i]!= s[j] and s[i]!=s[k] and s[i+j]!= s[k] :
            ans-=1
print(ans)
Problem p02718 (python)

Fixed submission:
n,m=map(int,input().split())
a=list(map(int,input().split()))
b=sum(a)
for i in range(n):
    if a[i]>=b/(4*m):
        a[i]=-1
if a.count(-1)>=m:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
a=list(map(int,input().split()))
b=sum(a)
for i in range(n):
    if a[i]>=b/(4*m):
        a[i]=x
if a.count(x)>=m:
    print('Yes')
else:
    print('No')
Problem p02760 (python)

Fixed submission:
A=[[int(x) for x in input().split()]for i in range(3)]
N = int(input())
b = []
for i in range(N):
    b.append(int(input()))
 
for i in range(3):
    if A[i][0] in b and A[i][1] in b and A[i][2] in b:
        print('Yes')
        exit()
for i in range(3):
    if A[0][i] in b and A[1][i] in b and A[2][i] in b:
        print('Yes')
        exit()
if A[0][0] in b and A[1][1] in b and A[2][2] in b:
    print('Yes')
    exit()
if A[2][0] in b and A[1][1] in b and A[0][2] in b:
    print('Yes')
    exit() 
print('No')

Buggy submission (verdict: Runtime Error):
A=[[int(x) for x in inout().split()]for i in range(3)]
n=int(input())
b=list(map(int,input().split()))
for i in range(3):
    if A[i][0] in b and A[i][1] in b and A[i][2] in b:
        print('Yes')
        exit()
    elif A[0][i] in b and A[1][i] in b and A[2][i] in b:
        print('Yes')
        exit()
if A[0][0] in b and A[1][1] in b and A[2][2] in b:
    print('Yes')
    exit()
if A[2][0] in b and A[1][1] in b and A[0][2] in b:
    print('Yes')
    exit()
print('No')

Buggy submission (verdict: Runtime Error):
A=[]
for i in range(3):
    A.append(list(map(int,input().split())))
N=int(input())
for i in range(N):
    b=int(input())
    for j in range(3):
        for k in range(3):
            if A[j][k]==b:
                A[j][k]=0
 
flag=False
for i in range(3):
    if A[i][:]==[0,0,0]:
        flag=True
    elif A[0][i]==0 and A[1][i]==0 and A[2][i]==0:
        flag=True
    elif A[1][1]==0 and A[0][2]==0 and A[2][0]==0:
        flag=True
    else A[0][0]==0 and A[1][1]==0 and A[2][2]==0:
        flag=True
if flag:
    print('Yes')
else:
    print('No')
Problem p02767 (python)

Fixed submission:
n=int(input())
l= list(int(i) for i in input().split())
a=int(round(sum(l)/n))
k=0
for j in l:
  k = k + (j-a)**2
print(k)

Buggy submission (verdict: Runtime Error):
n=int(input())
l=[]
for i in range(n):
  s=int(input())
  l.append(s)
 
 
a=int(round(sum(l)/n))
k=0
for j in l:
  k = k + (j-a)**2
print(k)

Buggy submission (verdict: Runtime Error):
n=int(input())
l=[]
for i in range(n):
  s=int(input())
  l.append(s)
 
 
a=round(sum(l)/n)
k=0
for j in l:
  k = k + (j-a)**2
print(k)

Buggy submission (verdict: Runtime Error):
n=int(input())
l=[]
for i in range(n):
  s=int(input())
  l.append(s)
 
 
a=round(sum(l)/n)
k=0
for j in range(n):
  k = k + (l[j]-a)**2
print(k)

Buggy submission (verdict: Runtime Error):
n=int(input())
l=[]
for i in range(n):
  s=int(input())
  l.append(s)
 
 
a=round(sum(l)/n)
k=0
for j in range(n):
  k+=(l[j]-a)**2
 
print(k)

Buggy submission (verdict: Runtime Error):
n=int(input())
l=[]
for i in range(n):
  s=int(input())
  l.append(s)
 
 
a=round(sum(l)/n)
k=0
for j in range(n):
  k+=(l[j]-a)**2
 
print(k)

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


a=round(sum(l)/n)
k=0
for j in range(n):
  k+=(l[j]-a)**2

print(k)

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

p=min(l)
q=max(l)+1
k=0
r=[]
for i in range(p,q):
  for j in range(n):
    k+=(l[j]-i)**2
  r.append(k)

print(min(r))
Problem p02772 (python)

Fixed submission:
_ = input()
a = list(map(int, input().split()))
 
for i in a:
	if i % 2 == 0 and i % 3 != 0 and i % 5 != 0:
		print('DENIED')
		break
else:
	print('APPROVED')

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(map(int, input().split()))
for i in a:
  if i%2==0 and i%3!=0 and i%5!=0:
    print('DENIED')
  	break
  else:
    print('APPROVED')

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(map(int, input().split()))
for i in a:
  if i%2==0 and i%3!=0 and i%5!=0:
    print('DENIED')
  	exit()
  else:
    print('APPROVED')
Problem p02778 (python)

Fixed submission:
print("x"*len(input()))

Buggy submission (verdict: Runtime Error):
s=input()
for i in range(len(s)):
  s[i]=x
print(s)
Problem p02783 (python)

Fixed submission:
h,a=map(int,input().split())
if h%a==0:
  print(int(h/a))
else:
  print(int(h//a)+1)

Buggy submission (verdict: Runtime Error):
h,a=map(int, input().solit())
if h%a==0:
  print(h/a)
else:
  print(int(h//a)+1)

Buggy submission (verdict: Runtime Error):
h,a=map(int, input().solit())
if h%a==0:
  print(h/a)
else:
  print(h//a+1)
Problem p02784 (python)

Fixed submission:
h, n = map(int, input().split())
a = list(map(int, input().split()))
at = sum(a)
 
if at >= h:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
h,n=map(int,input().split())
a=list(map(int,input().split())
if sum(a)>=h:
       	print('Yes')
else:
       print('No')

Buggy submission (verdict: Runtime Error):
h,n=map(int,input().split())
a=list(map(int,input().split())
if sum(a)>=h:
       	print('YES')
else:
       print('NO')

Buggy submission (verdict: Runtime Error):
h=int(input())
n=int(input())
l = [int(input()) for i in range(n)]
  
if sum(l)>=h:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
h,n=map(int,input().split())
l = [int(input()) for i in range(n)]
  
if sum(l)>=h:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
h,n=map(int,input().split())
l=[]
for i in range(n):
  l.append(int(input()))
  
if sum(l)>=h:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
h,n=map(int,input().split())
l=[]
for i in range(n):
  a=int(input())
  l.append(a)
if sum(l)>=h:
  print('Yes')
else:
  print('No')
Problem p02801 (python)

Fixed submission:
c=input()
abcStr = "abcdefghijklmnopqrstuvwxyz"
d=abcStr[abcStr.index(c)+1]
print(d)

Buggy submission (verdict: Runtime Error):
a=input()
abcStr = "abcdefghijklmnopqrstuvwxyz"
print(abcStr[index(a)+1])
Problem p02817 (python)

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

Buggy submission (verdict: Runtime Error):
s=input()
t=input()
print(t+s)

Buggy submission (verdict: Runtime Error):
s=input()
t=input()
print('t'+'s')
Problem p02885 (python)

Fixed submission:
a, b=map(int, input().split())
if a-2*b>=0:
  print(a-2*b)
else:
  print(0)

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
if (A - 2 * B) >= 0:
  print (A - 2 * B)
else:
  print('0')

Buggy submission (verdict: Runtime Error):
if (A - 2 * B) >= 0:
  print (A - 2 * B)
else:
  print('0')
Problem p02887 (python)

Fixed submission:
n=int(input())
s=input()
d=list(s)
cnt=0
for i in range(n-1):
  if s[i] != s[i+1]:
    cnt+=1
print(1+cnt)

Buggy submission (verdict: Runtime Error):
n=int(input)
s=input()
d=list(s)
cnt=0
for i in range(n-1):
  if s[i] == s[i+1]:
    cnt+=1
  else:
    continue
    
print(n-cnt)

Buggy submission (verdict: Runtime Error):
n=int(input)
s=input()
d=list(s)
cnt=0
for i in range(n-1):
  if s[i] != s[i+1]:
    cnt+=1
  else:
    continue
    
print(cnt+1)

Buggy submission (verdict: Runtime Error):
n=int(input)
s=input()
d=list(s)
cnt=0
for i in range(n-1):
  if s[i] != s[i+1]:
    cnt+=1
print(cnt+1)

Buggy submission (verdict: Runtime Error):
n=int(input)
s=input()
cnt=0
for i in range(n-1):
  if s[i] != s[i+1]:
    cnt+=1
print(cnt+1)
Problem p02899 (python)

Fixed submission:
n=int(input())
a=list(map(int, input().split()))
 
ans=[0]*n
for i, a in enumerate(a):
    ans[a-1]=(i+1)
 
print(*ans)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(map(int, input().split()))
 
ans=[0]*n
for i, a in enumerate(A):
    ans[a-1]=i+1
 
print(*ans)
Problem p02900 (python)

Fixed submission:
import fractions
a,b=map(int,input().split())
g=fractions.gcd(a,b)
ans=1
i=2
while i*i<=g:
    if g%i==0:
        ans+=1
        while g%i==0:
            g//=i
    i+=1
if g>1:
    ans+=1
print(ans)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
c=[i for i in range(1,a+1) if a%i==0]
d=[i for i in range(1,b+1) if b%i==0]
e=[i for i in c if i in d]
for i in range(1,len(e)-1):
    for j in range(i+1,len(e)):
        if e[j]%e[i]==0:
            e[j]=0
            break
e=list(set(e))
print(len(e)-1)
Problem p02921 (python)

Fixed submission:
s = input()
t = input()
cnt = 0
for i in range(3):
  if s[i] == t[i]:
  	cnt += 1
print(cnt)

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

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

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

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

Buggy submission (verdict: Runtime Error):
s, t=map(int, input().split())
cnt=0
for i in range(0, 3)
if s[i]==t[i]:
  cnt +=1
print(cnt)
Problem p02923 (python)

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

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

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

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

Fixed submission:
A,B = map(int,input().split())
print(max(A+B,A-B,A*B))

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
if a+b>=a-b and a+b>=a*b:
  print(a+b)
elif a-b>=a+b and a-b>=a*b:
  print(a-b)
else:
  print(a*b)

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
print(max[a+b, a-b, a*b])

Buggy submission (verdict: Runtime Error):
a, b=map(int, input().split())
print(max[a+b, a-b, a*b])
Problem p02952 (python)

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

Buggy submission (verdict: Runtime Error):
n=int(input())
cnt=0
for i in range(1,n+1):
  if len(i)%2==1:
    cnt+=1
print(cnt)
Problem p03035 (python)

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

if a >=13:
  print(b)
elif a >= 6:
  print(b//2)
else:
  print(0)

Buggy submission (verdict: Runtime Error):
if A >=13:
  print(B)
elif A >= 6:
  print(B/2)
else:
  print(0)
Problem p03037 (python)

Fixed submission:
n,m=map(int,input().split())
left=0
right=10**5
for i in range(m):
  l,r=map(int,input().split())
  left=max(left,l)
  right=min(right,r)
print(right-left+1 if right-left+1>0 else 0)

Buggy submission (verdict: Runtime Error):
n, m=map(int, input().split())
l, r=list(map(int, input().split()))
l.sort()
r.sort()
if max(l) < min(r):
  print(0)
else:
  print(min(r) - max(l) + 1)
Problem p03059 (python)

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

Buggy submission (verdict: Runtime Error):
a, b, t=map(int.input().split())
print(b*(t//a))
Problem p03060 (python)

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

s = 0
for i in range(n):
  if v[i] - c[i] >= 0:
    s += v[i] - c[i]
  else:
    continue
print(s)

Buggy submission (verdict: Runtime Error):
v = list(map(int, input().split()))
c = list(map(int, input().split()))
n = int(input())
s = 0
for i in range(n):
  if v[i] - c[i] > 0:
    s += v[i] - c[i]
  else:
    continue
print(s)

Buggy submission (verdict: Runtime Error):
v=list(map(int, input().split()))
c=list(map(int, input().split()))
n=int(input())
s=0
for i in range(n):
  if v[i]-c[i]>0:
    s=s+v[i]-c[i]
  else:
    continue
print(s)

Buggy submission (verdict: Runtime Error):
v, c=list(map(int, input().split()))
n=int(input())
s=0
for i in range(n):
  if v[i]-c[i]>0:
    s=s+v[i]-c[i]
  else:
    continue
print(s)

Buggy submission (verdict: Runtime Error):
v, c=list(map(int, input().split()))
n=int(input())
s=0
for i in range(n):
  if v[i]-c[i]>0:
    s=s+v[i]-c[i]
print(s)

Buggy submission (verdict: Runtime Error):
v, c=list(map(int, input().split()))
n=len(v)
n=len(c)
s=0
for i in range(n):
  if v[i]-c[i]>0:
    s=s+v[i]-c[i]
print(s)
Problem p03062 (python)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
fu=0
for i in range(n):
    if a[i]<0:
        fu+=1
        a[i]*=-1
if fu%2==0:
    print(sum(a))
else:
    print(sum(a)-2*min(a))

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
for i in range(n-1):
	if -a[i]-a[i+1]>=a[i]+a[i+1]:
      a[i]=-a[i]
      a[i+1]=-a[i+1]
print(sum(a))
Problem p03101 (python)

Fixed submission:
h, w=map(int, input().split())
H, W=map(int, input().split())

print((H-h)*(W-w))

Buggy submission (verdict: Runtime Error):
h, w, H, W=map(int, input().split())
print(h*W+w*H-w*h)
Problem p03106 (python)

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

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

Buggy submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
l=[]
for i in range(1,a):
  if a%i==0 and b%i==0:
    l.append(i)
print(l[k-1])
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=int(input())
if b%a==0:
  print(a+b)
else:
  print(b-a)
Problem p03211 (python)

Fixed submission:
s=input()
a=753
for i in range(len(s)-2):
  a=min(a, abs(753-int(s[i:i+3])))
print(a)

Buggy submission (verdict: Runtime Error):
s=input()
a=753
for i in range(len(s)-2):
  a=min(a, abs(753-int(s[i:i+3])))
print(a)

s=input()
like=753
ans=753
for i in range(len(s)-2):
    ans=min(ans,abs(like-int(s[i:i+3])))
print(ans)

Buggy submission (verdict: Runtime Error):
s=input()
for i in range(len(s)-2):
  a=int('s[i]'+'s[i+1]'+'s[i+2]')
print(abs(min(a-753)))
Problem p03220 (python)

Fixed submission:
n=int(input())
t, a=map(int, input().split())
h=list(int(i) for i in input().split())
temp=[abs(a-(t-k*0.006)) for k in h]
print(temp.index(min(temp))+1)

Buggy submission (verdict: Runtime Error):
n=int(input())
t, a=map(int, input().split())
h=[int(i) for i input().split()]
temp=[abs(a-(t-k*0.006)) for k in h]
print(temp.index(min(temp))+1)

Buggy submission (verdict: Runtime Error):
n=int(input())
t, a=map(int, input().split())
h=list(int(i) for i input().split())
temp=[abs(a-(t-k*0.006)) for k in h]
print(temp.index(min(temp))+1)

Buggy submission (verdict: Runtime Error):
n=int(input())
t, a=map(int, input().split())
h=list(int(i) for i input().split())
temp=[abs(a-(t-k*0.006)) for k in h]
print(temp.index(min(temp))+1)

Buggy submission (verdict: Runtime Error):
n=int(input())
t, a=map(int, input().split())
h=list(int(i) for i input().split())
temp=[abs(a-(t-k*0.006)) for k in h]
print(temp.index(min(temp))+1)

Buggy submission (verdict: Runtime Error):
n=int(input())
t, a=map(int, input().split())
h=[int(i) for i input.split()]
temp=[abs(a-(t-k*0.006)) for k in h]
print(temp.index(min(temp))+1)

Buggy submission (verdict: Runtime Error):
n=int(input())
t, a=map(int, input().split())
h=[int(i) for i input.split()]
temp=[abs(a-(t-k*0.006)) for k in h]
print(temp.index(min(temp))+1)

n = int(input())
t, a = map(int, input().split())
h = [int(i) for i in input().split()]
difference = [abs(a - (t - i * 0.006)) for i in h]
print(difference.index(min(difference)) + 1)

Buggy submission (verdict: Runtime Error):
n=int(input())
t, a=map(int, input().split())
h=list(int(i) for i input.split())
temp=[abs(a-(t-(k*0.006))) for k in h]
print(temp.index(min(temp))+1)
Problem p03238 (python)

Fixed submission:
n=int(input())
if n==1:
  print('Hello World')
else:
  a=int(input())
  b=int(input())
  print(a+b)

Buggy submission (verdict: Runtime Error):
n=int(input())
if n==1:
  print('Hello World')
else:
  a, b=map(int, input().split())
  print(a+b)

Buggy submission (verdict: Runtime Error):
n=int(input())
if n==1:
  print('Hello World')
else:
  a, b=map(inr, input().split())
  print(a+b)
Problem p03264 (python)

Fixed submission:
k=int(input())
if k%2==0:
  print(k**2//4)
else:
  print((k**2-1)//4)

Buggy submission (verdict: Runtime Error):
k=int(input())
if k%2==0:
  print(n**2/4)
else:
  print((n**2-1)/4)

Buggy submission (verdict: Runtime Error):
k=int(input())
if k%2==0:
  print(n**2//4)
else:
  print((n**2-1)//4)

Buggy submission (verdict: Runtime Error):
k=int(input())
if k%2==0:
  print((n//2)**2)
else:
  print((n**2-1)//4)
Problem p04044 (python)

Fixed submission:
X, L = list(map(int,input().split()))
li = sorted([input() for i in range(X)])
ans = ''

for i in li:
    ans += i

print(ans)

Buggy submission (verdict: Runtime Error):
X, L = [int(input()) for i in range(2)]
li = sorted([input() for i in range(X)])
ans = ''

for i in li:
    ans += i

print(ans)

Buggy submission (verdict: Runtime Error):
X, L = [int(input()) for i in range(2)]
li = sorted([input() for i in range(X)])
ans = ''

for i in li:
    ans += i

print(ans)
Problem p03409 (python)

Fixed submission:
"""
出典:https://atcoder.jp/contests/abc005/tasks/abc005_3
"""
def main():
  N = int(input())
  red_l = [list(map(int,input().split())) for _ in range(N)]
  blue_l = [list(map(int,input().split())) for _ in range(N)]
  red_l=sorted(red_l,key=lambda x:-x[1])
  blue_l=sorted(blue_l,key=lambda x:x[0])

  count=0
  for r in red_l:
    for b in blue_l:
      if r[0]<b[0] and r[1]<b[1]:
        count +=1
        blue_l.remove(b)
        break
  print(count)

if __name__=="__main__":
  main()

Buggy submission (verdict: Runtime Error):
"""
出典:https://atcoder.jp/contests/abc005/tasks/abc005_3
"""
def main():
  N = int(input())
  red_l = [list(map(int,input().split())) for _ in range(N)]
  blue_l = [list(map(int,input().split())) for _ in range(N)]
  red_l=sorted(red_l,key=lambda x:-x[1]s)
  blue_l=sorted(blue_l,key=lambda x:x[0])

  count=0
  for r in red_l:
    for b in blue_l:
      if r[0]<b[0] and r[1]<b[1]:
        count +=1
        blue_l.remove(b)
        break
  print(count)

if __name__=="__main__":
  main()