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

Fixed submission:
N=int(input())
An=list(map(int, input().rstrip().split()))
cnt=0
while True:
    if len(list(filter(lambda a:(a+1)%2, An))) < len(An):
        break
    An=list(map(lambda a:int(a/2), An))
    cnt+=1
print(cnt)

Buggy submission (verdict: Runtime Error):
N=int(input().rstrip().split())
An=list(map(int, input().rstrip().split()))
cnt=0
while True:
    if len(list(filter(lambda a:(a+1)%2, An))) < len(An):
        break
    An=list(map(lambda a:int(a/2), An))
    cnt+=1
print(cnt)
Problem p03220 (python)

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

temp = abs(a - (t - h_list[0] * 0.006))
result = 1
i=1
for h in h_list:
    if abs(a - (t - h * 0.006)) < temp:
        temp = abs(a - (t - h * 0.006))
        result = i
    i += 1
print(result)

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

temp = abs(a - (t - h[0] * 0.006))
result = 1
i=1
for h in h_list:
    if abs(a - (t - h * 0.006)) < temp:
        temp = abs(a - (t - h * 0.006))
        result = i
    i += 1
print(i)
Problem p03254 (python)

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


a = list(map(int,input().split()))
  
a.sort()

total=0
ans=0
for i in range(n):
  total += a[i]
 
  if total > x:
    ans = i
    break
  elif total ==x:
    ans = i+1
    break
  else:
    ans=i
  
print(ans)

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


a = list(map(int,input().split()))
  
a.sort()

total=0
ans=0
for i in range(n):
  total += a[i]
 
  if total > x:
    ans = i
    break
  else if total ==x:
    ans = i+1
    break
  else:
    ans=i
  
print(ans)
Problem p03369 (python)

Fixed submission:
s = input()
a = list(s)
result = 700
for i in a:
  if i == "o":
    result += 100
print(result)

Buggy submission (verdict: Runtime Error):
s = input()
a = list(s)
result = 700
for i in a:
  if i == o:
    result += 100
print(result)

Buggy submission (verdict: Runtime Error):
s = input()
a = list(s)
result = 700
for i in a:
  if a[i] == o:
    result += 100
print(result)
Problem p03370 (python)

Fixed submission:
n, x = map(int, input().split())
list_m = [1]*n
for i in range(0, n):
    list_m[i] = int(input())
    
min = min(list_m)
sum = sum(list_m)

x -= sum

result = int(x/min) + n
print(result)

Buggy submission (verdict: Runtime Error):
n, x = map(int, input().split())
list_m = [1]*n
for i in n:
    list_m[i] = int(input())
    
min = min(list_m)
sum = sum(list_m)

x -= sum

result = int(x/min) + n
print(result)

Buggy submission (verdict: Runtime Error):
n, x = map(int, index().split())
list_n = [0]*x
for i in range(0, x-1)
    list_n[i] = input()
    
min = min(list_n)
sum = sum(list_n)

x -= sum
result = int(x/min) + n
print(result)
Problem p03470 (python)

Fixed submission:
n = int(input())
flag = [0] * 101

for i in range(n):
    d = int(input())
    flag[d] = 1

result = 0
for i in range(101):
    result += flag[i]

print(result)

Buggy submission (verdict: Runtime Error):
n = int(input())
flag = [0] * 101

for i in n:
    d = input()
    flag[d] = 1

for i in 101:
    result += flag[i]

print(result)
Problem p03494 (python)

Fixed submission:
n = int(input())
List=list(map(int,input().split()))
result = 0


for i in range(200):
	for j in range(n):
		if List[j]%2 != 0:
			break
		List[j] /= 2

	else:
		result += 1
		continue
	break
  
print(result)

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


while true:
	for j in range(n):
		if List[j]%2 != 0:
			break
		List[j] /= 2

	else:
		result += 1
		continue
	break
  
print(result)

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


for i in 200:
	for j in range(n):
		if List[j]%2 != 0:
			break
		List[j] /= 2

	else:
		result += 1
		continue
	break
  
print(result)
Problem p03636 (python)

Fixed submission:
s = input()
print(s[0] + str(len(s)-2) + s[-1])

Buggy submission (verdict: Runtime Error):
s = input()
print(s[0] + len(s)-2 + s[-1])

Buggy submission (verdict: Runtime Error):
s = input()
print(s[0] + s.length-2 + s[-1])
Problem p03644 (python)

Fixed submission:
import sys

n=int(input())
if n==1:
  print(1)
  sys.exit()
result = 0
for i in range(n):
  a = n-i
  while True:
    if a % 2 == 1:
      break
    else:
      if a == 2:
        print(n-i)
        sys.exit()
      else:
        a /= 2

Buggy submission (verdict: Runtime Error):
n=int(input())
result = 0
for i in range(n):
  a = n-i
  while True:
    if a % 2 == 1:
      break
    else:
      if a == 2:
        print(n-i)
        sys.exit()
      else:
        a /= 2
Problem p03433 (python)

Fixed submission:
n = int(input())
a = int(input())
j = n % 500
if (j <= a):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n = input()
a = input()
j = n % 500
if (j <= a):
  print("YES")
else:
  print("NO")
Problem p03455 (python)

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

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split())
c = mod(a*b, 2)
if (c == 0) :
	print("Odd")
else:
	print("Even")

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split())
c = mod(a*b, 2)
if (c == 0)
	print("Odd")
else if
	print("Even")
Problem p03720 (python)

Fixed submission:
import math
import sys

#n, a, b= map(int, input().split())
n, m  = map(int, input().split())
#s = list(str(input()))
#n = int(input())
#a = list(map(int, input().split()))

a = [""]*m
b = [""]*m
for i in range(m):
  #a[i] = int(input())
  a[i], b[i] = map(int, input().split())

num = [int(i+1) for i in range(n)]
count = [0]*n

for i in range(m):
  for ii in range(n):
    if(a[i] == num[ii]):
      count[ii] = count[ii] + 1
    if(b[i] == num[ii]):
      count[ii] = count[ii] + 1

for i in range(n):
  print(count[i])

Buggy submission (verdict: Runtime Error):
import math
import sys

#n, a, b= map(int, input().split())
n, m  = map(int, input().split())
#s = list(str(input()))
#n = int(input())
#a = list(map(int, input().split()))

a = [""]*m
b = [""]*m
for i in range(m):
  #a[i] = int(input())
  a[i], b[i] = map(int, input().split())

num = [int(i+1) for i in range(m)]
count = [0]*n

for i in range(m):
  for ii in range(n):
    if(a[i] == num[ii]):
      count[ii] = count[ii] + 1
    if(b[i] == num[ii]):
      count[ii] = count[ii] + 1

for i in range(n):
  print(count[i])

Buggy submission (verdict: Runtime Error):
import math
import sys

#n, a, b= map(int, input().split())
n, m  = map(int, input().split())
#s = list(str(input()))
#n = int(input())
#a = list(map(int, input().split()))

a = [""]*m
b = [""]*m
for i in range(m):
  #a[i] = int(input())
  a[i], b[i] = map(int, input().split())

num = [int(i+1) for i in range(m)]
count = [0]*n

for i in range(m):
  for ii in range(n):
    if(a[i] == num[ii]):
      count[ii] = count[ii] + 1
    if(b[i] == num[ii]):
      count[ii] = count[ii] + 1

for i in range(n):
  print(count[i])

Buggy submission (verdict: Runtime Error):
import math
import sys

#n, a, b= map(int, input().split())
n, m  = map(int, input().split())
#s = list(str(input()))
#n = int(input())
#a = list(map(int, input().split()))

a = [""]*m
b = [""]*m
for i in range(m):
  #a[i] = int(input())
  a[i], b[i] = map(int, input().split())

num = [int(i+1) for i in range(5)]
count = [0]*n

for i in range(m):
  for ii in range(n):
    if(a[i] == num[ii]):
      count[ii] = count[ii] + 1
    if(b[i] == num[ii]):
      count[ii] = count[ii] + 1

for i in range(n):
  print(count[i])
Problem p03944 (python)

Fixed submission:
import math
import sys
import numpy as np

#n, a, b= map(int, input().split())
w, h, n  = map(int, input().split())
#s = list(str(input()))
#n = int(input())
#a = list(map(int, input().split()))

x = [0]*n
y = [0]*n
a = [0]*n
for i in range(n):
  x[i], y[i], a[i] = map(int, input().split())
area = np.ones([w,h])

for i in range(n):
  if(a[i] == 1):
    area[:x[i],:] = 0
  if(a[i] == 2):
    area[x[i]:,:] = 0
  if(a[i] == 3):
    area[:,:y[i]] = 0
  if(a[i] == 4):
    area[:,y[i]:] = 0

print(np.count_nonzero(area == 1))

Buggy submission (verdict: Runtime Error):
 import math
import sys
import numpy as np

#n, a, b= map(int, input().split())
w, h, n  = map(int, input().split())
#s = list(str(input()))
#n = int(input())
#a = list(map(int, input().split()))

x = [0]*n
y = [0]*n
a = [0]*n
for i in range(n):
  x[i], y[i], a[i] = map(int, input().split())
area = np.ones([w,h])

for i in range(n):
  if(a[i] == 1):
    area[:x[i],:] = 0
  if(a[i] == 2):
    area[w-x[i]-1:w,:] = 0
  if(a[i] == 3):
    area[:,:y[i]] = 0
  if(a[i] == 4):
    area[:,h-y[i]-1] = 0

print(np.count_nonzero(area == 1))
Problem p03308 (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=map(int, input().split())
maxnum=max(A)
minnum=min(A)
print(maxnum-minnum)

Buggy submission (verdict: Runtime Error):
N=int(input())
A=map(int, input().split())
maxnum=max(A)
minnum=min(A)
print(maxnum-minnum)
Problem p03455 (python)

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

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split())
c = a*b
mod = c % 2
if mod==0
   print("Even")
else print("Odd")
Problem p03636 (python)

Fixed submission:
S=str(input())
L=len(S)
print(S[0]+str(L-2)+S[L-1])

Buggy submission (verdict: Runtime Error):
s=input()
N=len(s)
print(s[0]+ str(N-2)+s[N])
Problem p03254 (python)

Fixed submission:
N, x = map(int, input().split())
an = list(map(int, input().split()))
an.sort()
count = 0
for i in range(N):
  x -= an[i]
  if x >= 0:
    count += 1
  else:
    break
if x > 0:
  count -= 1
print(count)

Buggy submission (verdict: Runtime Error):
N, x = map(int, input().split())
an = list(map(int, input().split()))
an.sort()
flag = [0]*N
count = 0
i = 0
xs = x
while(1):
  if x >= an[i]:
    x -= an[i]
    if flag[i] == 0:
      flag[i] += 1
      count += 1
    elif flag[i] == 1:
      flag[i] += 1
      count -= 1
      i = 0
    else:
      i = 0
  if x == 0:
    break
  i += 1
  if i >= N:
    i = 0
    if xs == x:
      break
print(count)v
Problem p03369 (python)

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

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

mn = [0]*N
for i in range(N):
  mn[i] = int(input())
  
ans = N
x = X - sum(mn)

while(x >= min(mn)):
  if x // min(mn) == 0:
    mn[mn.index(min(mn))] = 1000000
  else:
    if x >= min(mn):
      x -= min(mn)
      ans += 1
      
print(ans)
Problem p03485 (python)

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

print(int((a+b)/2)+(a+b)%2)

Buggy submission (verdict: Runtime Error):
print('Yes'*(sorted(input())<sorted(input())[::-1])or'No')

Buggy submission (verdict: Runtime Error):
s1 = input()
t1 = input()

s = list(s1)
t = list(t1)

s.sort()
t.sort(reverse=1)

i = 0
while(1):
  if ord(s[i]) < ord(t[i]):
    print('YES')
    break
  else :
    if i+1 == min(len(s1),len(t1)):
    	print('NO')
    	break
    else : i+=1

Buggy submission (verdict: Runtime Error):
print(-~sum(map(int, imput().split()))//2)
Problem p03493 (python)

Fixed submission:
s = input()
c = 0

for si in s:
  if si == '1': c+=1
    
print(c)

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

ct = 0
while(1) :
  count = 0
  for i in range(n):
    if a[i]%2 != 0:
      count+=1
  if count != 0:
    break
  else:
    a1 = [j/2 for j in a]
    a = a1
    ct += 1
  
print(ct)
Problem p03220 (python)

Fixed submission:
import math
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
before=math.fabs(t-h[0]*0.006-a)
num=1
for i in range(n-1):
  diff=before-math.fabs(t-h[i+1]*0.006-a)
  if diff>0:
    before=math.fabs(t-h[i+1]*0.006-a)
    num=i+2
print(num)

Buggy submission (verdict: Runtime Error):
import math
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input())
before=math.fabs(t-h[0]*0.006-a)
print(before)
mi=0
for i in range(n-1):
    diff=before-math.fabs(t-h[i+1]*0.006-a)
    if diff>0:
       before=math.fabs(t-h[i+1]*0.006-a)
       mi=i+1
print(mi)

Buggy submission (verdict: Runtime Error):
import math
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input())
before=math.fabs(t-h[0]*0.006-a)
mi=0
for i in range(n-1):
    diff=before-math.fabs(t-h[i+1]*0.006-a)
    if diff>0:
       before=math.fabs(t-h[i+1]*0.006-a)
       mi=i+1
print(mi)

Buggy submission (verdict: Runtime Error):
import math
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input())
before=math.fabs(t-h[0]*0.006-a)
mi=0
for i in range(n-1):
    diff=before-math.fabs(t-h[i+1]*0.006-a)
    if diff<0:
       mi=i+1
print(mi)

Buggy submission (verdict: Runtime Error):
import math
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input())
t_list=[]
for i in range(n):
    math.fabs(t-h[i]*0.006-a)
print(min(t_list))
Problem p03254 (python)

Fixed submission:
n,x=map(int,input().split())
a=list(map(int,input().split()))
a.sort()
c=0
for i in range(n):
  if n>=i and x>=a[i]:
    x-=a[i]
    c+=1
    if n==c and x==0:
      print(n)
    if n==c and x!=0:
      print(n-1)
  else:
    print(c)
    break

Buggy submission (verdict: Runtime Error):
n,x=map(int,input().split())
a=list(map(int,input().split()))
a.sort()
c=0
for i in range(len(a)+1):
  if x>0 and x>a[i]:
    x-=a[i]
    c+=1
  else:
    print(c)
    break

Buggy submission (verdict: Runtime Error):
n,x=map(int,input().split())
a=list(map(int,input().split()))
a.sort()
c=0
for i in range(len(a)+1):
  if x>0 and x>=a[i]:
    x-=a[i]
    c+=1
  else:
    print(c)
    break

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

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

Fixed submission:
item=list(map(int,input().split()))
item.sort()
times=0
while sum(item)/3!=item[0]:
  if item[1]==item[2]:
    item[0]+=2
    times+=1
    item.sort()
  else:
    item[0]+=1
    item[1]+=1
    times+=1
    item.sort()
print(times)

Buggy submission (verdict: Runtime Error):
item=list(map(int,input().split())).sorted()
print(item)
Problem p03433 (python)

Fixed submission:
n = int(input())
a = int(input())
if n % 500 <= a:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n = map(int, input())
a = map(int, input())
if n % 500 < a:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
n = map(int, input())
a = map(int, input())
if n%500 < a:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
n = map(int, input())
a = map(int, input())
if n%500 < a:
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
n = map(int, input())
a = map(int, input())
if n%500 < a:
  print('YES')
else:
  print('NO')

Buggy submission (verdict: Runtime Error):
n = map(int, input())
a = map(int, input())
if n%500 < a;
    print('YES')
else
    print('NO')

Buggy submission (verdict: Runtime Error):
n= int(input())
a = int(input())
if n%500 < a:
    print('YES')
else
    print('NO')

Buggy submission (verdict: Runtime Error):
n = map(int, input())
a = map(int, input())
if n%500 < a:
  print('YES')
else
  print('NO')

Buggy submission (verdict: Runtime Error):
n = map(int, input())
a = map(int, input())
if n%500 < a:
    print('YES')
else
    print('NO')
Problem p03469 (python)

Fixed submission:
s=input()
print(s.replace('2017','2018'))

Buggy submission (verdict: Runtime Error):
print(input().replace(s[3],'8'))

Buggy submission (verdict: Runtime Error):
s=input()
s[3]='8'
print(s)

Buggy submission (verdict: Runtime Error):
s = input()
s[3]=7
print(s)
Problem p03471 (python)

Fixed submission:
n,y = map(int, input().split())
for a in range(n+1):
  for b in range(n+1-a):
    if a*10000+b*5000+(n-a-b)*1000==y:
      print(str(a)+" "+str(b)+" "+ str(n-a-b))
      exit()
print("-1 -1 -1")

Buggy submission (verdict: Runtime Error):
n,y = int(input())
for a in range(n+1):
  for b in range(n+1-b):
    if a*10000+b*5000+(n-a-b)*1000==n:
      print str(a)+" "+str(b)+" "+ str(n-a-b)
print "-1 -1 -1"
Problem p03644 (python)

Fixed submission:
n=int(input())
for i in range(99):
  if 2**i <= n:
    continue
  else:
    print(2**(i-1))
    break

Buggy submission (verdict: Runtime Error):
n=int(input())
for i in range(math.inf):
  if 2**i < n:
    continue
  else:
    print(2**(i-1))
    break

Buggy submission (verdict: Runtime Error):
n=int(input())
for i in range(math.inf):
  if 2**i < n:
    continue
  else:
    print(2**(i-1))

Buggy submission (verdict: Runtime Error):
n=int(input())
for i in range(math.inf):
  if n%2==0:
    print(n)
    break
  else:
    n=n/2

Buggy submission (verdict: Runtime Error):
a=int(input())
cnt=0
for i in range(math.inf):
  if a%2==0:
    cnt+=1
    a/=2
  else:
    print(cnt)
    break

Buggy submission (verdict: Runtime Error):
a=int(input())
cnt=0
for i in range(math.inf):
  if a%2==0:
    cnt+=1
    a/=2
  else:
    print(cnt)
Problem p03285 (python)

Fixed submission:
N=int(input())
#number of cakes
if all( (N - 4*i) % 7 != 0 for i in range(N//4 + 1)):
    print("No")
else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
N=int(input())
#number of cakes
if all( (N - 4*i) % 7 != 0 for i in range(N/4)):
    print("No")
else:
    print("Yes")
Problem p03331 (python)

Fixed submission:
x=int(input())
count=100000
suma=0
sumb=0
for a in range(1, x):
    b = x-a
    y = sum(map(int, str(a))) + sum(map(int, str(b)))
    if y<count:
        count=y
print(count)

Buggy submission (verdict: Runtime Error):
x=int(input())
count=0
for a in range(1, x):
    suma=0
    sumb=0
    b=x-a
    while (a > 0):
        suma += a%10
        a//=10
    while (b > 0):
        sumb += b%10
        b//=10
    count = min(count, suma+sumb)
print(min(S))
Problem p03369 (python)

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

Buggy submission (verdict: Runtime Error):
N, X=map(int, input().split())
A=[int(input()) for _ in range(N)]
rest=X-sum(A)
print(rest//min(A)+N)

Buggy submission (verdict: Runtime Error):
N, X=map(int, input().split())
A=[int(input(for _ in range(N)))]
rest=X-sum(A)
print(rest//min(A)+N)
Problem p03370 (python)

Fixed submission:
N, X=map(int, input().split())
A=[int(input()) for _ in range(N)]
rest=X-sum(A)
print(rest//min(A)+N)

Buggy submission (verdict: Runtime Error):
N, X=map(int, input().split())
A=[int(input(for _ in range(N)))]
rest=X-sum(A)
print(rest//min(A)+N)

Buggy submission (verdict: Runtime Error):
N, X=map(int, input().split())
A=[int(input(for _ in range(N)))]
print((X-sum(A))//min(A)+N)

Buggy submission (verdict: Runtime Error):
N, X=map(int, input().split)
A=[int(input(for _ in range(N)))]
print((X-sum(A))//min(A)+N)
Problem p03485 (python)

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

Buggy submission (verdict: Runtime Error):
a, b = map(int, input(),split())
c= a+b
if c%2==0:
 print(c/2)
else:
print((c+1)/2)
Problem p03493 (python)

Fixed submission:
print(input().count("1"))

Buggy submission (verdict: Runtime Error):
input()
#文字列を数字へ
A=list(map(int, input().split()))

count=0

#Aへの繰り返し処理
while all(i%2==0 for i in A):
        count+=1
        A= [i/2 for i in A]


print(count)

Buggy submission (verdict: Runtime Error):
print(input().count"1")
Problem p03494 (python)

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

count=0

while all(i%2==0 for i in A):
        count+=1
        A= [i/2 for i in A]

print(count)

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

while all(a%2 == 0 for i in a):
    i=[i/2 for i in a]
    count+=1
print(count)
Problem p03644 (python)

Fixed submission:
n=int(input())
count=1
while count<=n:
    count=2*count
else:
    print(int(count/2))

Buggy submission (verdict: Runtime Error):
N=int(input())
a=math.log2(N)
print(round(a))
Problem p03658 (python)

Fixed submission:
n, k = map(int, input().split())
l = list(map(int, input().split()))
l.sort(reverse = True)
sum_l=0
for i in range(0,k):
    sum_l+=l[i]

print(sum_l)

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
l = list(map(int, input().split()))
l.sort(revese = True)
sum_l=0
for i in range(0,k):
    sum_l+=l[i]

print(sum_l)

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
l = list(map(int, input().split))
l.sort(revese = True)
sum_l=0
for i in range(0,k):
    sum_l+=l[i]

print(sum_l)
Problem p03814 (python)

Fixed submission:
s = str(input())
for i in range(len(s)):
    if s[i] == 'A':
        min = i
        break
for i in reversed(range(len(s))):
    if s[i] =='Z':
        max = i
        break

print(max-min+1)

Buggy submission (verdict: Runtime Error):
s = str(input())
print(len(s))
for i in range(len(s)):
    if s[i] == 'A':
        min = i
        break
for i in reversed(range(len(s))):
    if s[i] =='Z':
        max = i
        break

print(max)print(max-min+1)
Problem p03943 (python)

Fixed submission:
l = sorted(list(map(int, input().split())))
if l[0] + l[1] == l[2]:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
l = list(map(int,input().split()))
a = 0
b = 1
c = 1
while c <= l[0]:
    if a + b >= l[1] and a + b <= l[2]:
        sum += c
    if b == 9:
        b = 0
        a += 1
    else:
        b += 1
    c = 10 * a + b
print(sum)
Problem p03962 (python)

Fixed submission:
l = list(map(int, input().split()))
s = 3
for i in range(3):
    for j in range(i + 1, 3):
        if l[i] == l[j]:
            s = s - 1
if l[0] == l[1] and l[1] == l[2]:
    s = s + 1
print(s)

Buggy submission (verdict: Runtime Error):
l = list(map(int, input().split()))
s = 3
for i in range(3):
    for j in range(i + 1, 3):
        if l[i] == l[j]:
            s = s - 1
if l[0] = l[1] and l[1] = l[2]:
    s = s + 1
print(s)

Buggy submission (verdict: Runtime Error):
l = list(map(int, input().split()))
for i in range(3):
    for j in range(i + 1, 3):
        if l[i] == l[j]:
            s = s + 1
print(s)
Problem p04011 (python)

Fixed submission:
l = [int(input()) for i in range(4)]
if l[0] <= l[1]:
    sum = l[0] * l[2]
else:
    sum = l[1] * l[2] + (l[0]-l[1]) * l[3]
print(sum)

Buggy submission (verdict: Runtime Error):
l = [int(input()) for i range(4)]
if l[0] <= l[1]:
    sum = l[0] * l[2]
else:
    sum = l[1] * l[2] + (l[0]-l[1]) * l[3]
print(sum)

Buggy submission (verdict: Runtime Error):
l = [int(input) for i range(4)]
if l[0] <= l[1]:
    sum = l[0] * l[2]
else:
    sum = l[1] * l[2] + (l[0]-l[1]) * l[3]
print(sum)

Buggy submission (verdict: Runtime Error):
l = list(map(int, input().split()))
if l[0] <= l[1]:
    sum = l[0] * l[2]
else:
    sum = l[1] * l[2] + (l[0]-l[1]) * l[3]
print(sum)

Buggy submission (verdict: Runtime Error):
l=list(map(int, input().split()))
if l[0] <= l[1]:
    sum = l[0] * l[2]
else:
    sum = l[1] * l[2] + (l[0]-l[1]) * l[3]
print(sum)

Buggy submission (verdict: Runtime Error):
l=list(map(int, input.split()))
if l[0] <= l[1]:
    sum = l[0] * l[2]
else:
    sum = l[1] * l[2] + (l[0]-l[1]) * l[3]
print(sum)
Problem p03220 (python)

Fixed submission:
N=int(input())
T,A = map(int,input().split())
H=list(map(float,input().split()))
tm=0
tem=0
TEM = []
TM = []
for h in H:
    tm=T-h*0.006
    TM.append(tm)
for tm in TM:
    tem=abs(tm-A)
    TEM.append(tem)
num = TEM.index(min(TEM))
print(num+1)

Buggy submission (verdict: Runtime Error):
N=int(input())
T,A = map(int,input().split())
H=list(map(float,input().split()))
tm=0
tem=0
TEM = []
TM = []
for h in H:
    tm=T-h*0.006
    TM.append(tm)
for tm in TM:
    tem=abs(tm-A)
    TEM.append(tem)
num = TEM.index(min(1))
print(num+1)