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

Fixed submission:
import sys
sys.setrecursionlimit(1000000)

N=int(input())
H=list(map(int,input().split()))
ans=[]

def compare(list,i,holder=0):
	if i==N-1:
		ans.append(holder)
		return holder
	if list[i]>=list[i+1]:
		return compare(list,i+1,holder+1)
	else:
		ans.append(holder)
		return compare(list,i+1)						

compare(H,0)
print(max(ans))

Buggy submission (verdict: Runtime Error):
N=int(input())
H=list(map(int,input().split()))
ans=[]

def compare(list,i,holder=0):
	if i==N-1:
		return holder
	if list[i]>=list[i+1]:
		compare(list,i+1,holder+1)
	else:
		return holder

def main(list,i=0):
	holder=compare(list,i)
	ans.append(holder)
	if i+holder<=N-1:
		main(list,i+holder)
main(H)
print(ans.max)
Problem p02934 (python)

Fixed submission:
N=int(input())
A=map(int,input().split()) 
ans=0
for a in A:
  ans += 1/a
print(1/ans)

Buggy submission (verdict: Runtime Error):
N=int(input())
A=map(int(),input().split()) 
ans=0
for a in A:
  ans+=a
print(ans)
Problem p02953 (python)

Fixed submission:

def hoge(lst,i):
    if lst[i]==lst[i+1] and len(lst)>i+2:
        return hoge(lst,i+1)
    if lst[i]>lst[i+1]:return True
    if lst[i]<lst[i+1]:return False

N = int(input())
H = list(map(int,input().split()))
det=0

for i in range(N-1):
    if H[i]-1>H[i+1]:
        det+=1
        print("No")
        break
    if i+2<=N-1:
        if H[i]>H[i+1] and H[i+1] > H[i+2]:
            det+=1
            print("No")
            break
        if H[i]>H[i+1] and hoge(H,i+1):
            det+=1
            print("No")
            break
if det==0:print("Yes")

Buggy submission (verdict: Runtime Error):
def hoge(lst,i):
    if lst[i]==lst[i+1]:
        return hoge(lst,i+1)
    if lst[i]>lst[i+1]:return True
    if lst[i]<lst[i+1]:return False

N = int(input())
H = list(map(int,input().split()))
det=0

for i in range(N-1):
    if H[i]-1>H[i+1]:
        det+=1
        print("No")
        break
    if i+2<=N-1:
        if H[i]>H[i+1] and H[i+1] > H[i+2]:
            det+=1
            print("No")
            break
        if H[i]>H[i+1] and hoge(H,i+1):
            det+=1
            print("No")
            break
if det==0:print("Yes")

Buggy submission (verdict: Runtime Error):

def hoge(lst,i):
    if lst[i]==lst[i+1]:
        hoge(lst,i+1)
    if lst[i]>lst[i+1]:return True
    if lst[i]<lst[i+1]:return False

N = int(input())
H = list(map(int,input().split()))
det=0

for i in range(N-1):
    if H[i]-1>H[i+1]:
        det+=1
        print("No")
        break
    if i+2<=N-1:
        if H[i]>H[i+1] and H[i+1] > H[i+2]:
            det+=1
            print("No")
            break
        if hoge(H,i):
            det+=1
            print("No")
            break
if det==0:print("Yes")
Problem p02988 (python)

Fixed submission:
n=int(input())
p=input().split()  
p=list(map(int,p))          
cnt=0

for i in range(n-2):
  l=p[i:i+3]
  if l[0]>=l[1] and l[1]>=l[2]:
    cnt+=1
  if l[2]>=l[1] and l[1]>=l[0]:
    cnt+=1

print (cnt)

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

for i in range(n-2):
  l=p[i:i+2]
  if l[0]>=l[1] and l[1]>=l[2]:
    cnt+=1
  if l[2]>=l[1] and l[1]>=l[0]:
    cnt+=1

print (cnt)

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

for i in range(n-2):
  l=p[i:i+2]
  if l[0]>=l[1] and l[1]>=l[2]:
    cnt+=1
  if l[2]>=l[1] and l[1]>=l[0]:
    cnt+=1

print (cnt)

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

for i in range(n-2):
  l=p[i:i+2]
  if l[0]>=l[1] and l[1]>=l[2]:
    cnt+=1
  if l[2]>=l[1] and l[1]>=l[0]:
    cnt+=1

print (cnt)
Problem p03043 (python)

Fixed submission:
from math import log2,ceil
N,K=map(int,(input().split()))
l=m=0
if N<K:
    for k in range(1,N+1):
        x=(0.5**ceil(log2(K/k)))/N
        l+=x
if N>=K:
    for k in range(1,K):
        x=(0.5**ceil(log2(K/k)))/N
        l+=x
    m=(N-K+1)/N
print (l+m)

Buggy submission (verdict: Runtime Error):
from math import log2,ceil
N,K=map(int,(input().split()))
l=0
if N<K:
    for k in range(1,N+1):
        x=(0.5**ceil(log2(K/k)))/N
        l+=x
if N>=K:
    for k in range(1,K):
        x=(0.5**ceil(log2(K/k)))/N
        l+=x
    m=N-K/N 
print (l+m)
Problem p02971 (python)

Fixed submission:
n=int(input())
a=[int(input()) for i in range(n)]

max1 = 0
max1_ind = 0
max2 = 0
max2_ind = 0
 
for i in range(n):
    if max2 <= a[i]:
        if max1 <= a[i]:
            max2 = max1
            max2_ind = max1_ind
            max1 = a[i]
            max1_ind = i
            
        else:
            max2 = a[i]
            max2_ind = i
    
for j in range(n):
    if j == max1_ind:
        print(max2)
    else:
        print(max1)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=[int(input()) for i in range(n)]
max1 = 0
max1_ind = 0
max2 = 0
max2_ind = 0
 
for i in range(n):
    if max2 =< a[i]:
        if max1 =< a[i]:
            mzx1 = a[i]
            max1_ind = i
            max2 = max1
            max2_ind = max1_ind
        else:
            max2 = a[i]
            max2_ind = i
    
for j in range(n):
    if j == max1_ind:
        print(max2)
    else:
        print(max1)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=[int(input()) for i in range(n)]
max1 = 0
max1_ind = 0
max2 = 0
max2_ind = 0
 
for i in range(n):
    if max2 =< a[i]:
        if max1 =< a[i]:
            max1 = a[i]
            max1_ind = i
            max2 = max1
            max2_ind = max1_ind
        else:
            max2 = a[i]
            max2_ind = i
    
for j in range(n):
    if j == max1_ind:
        print(max2)
    else:
        print(max1)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=[int(input()) for i in range(n)]
max1 = 0
max1_ind = 0
max2 = 0
max2_ind = 0
 
for i in range(n):
  if max1 < a[i]:
    max1 = a[i]
    max1_ind = i
    max2 = max1
    max2_ind = max1_ind
    
for i in range(n):
  if i = max1_ind:
    print(max2)
  else:
    print(max1)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=[int(input()) for i in range(n)]
max = 0
max_ind = 0
max2 = 0
max2_ind = 0

for i in range(n):
  if max < a[i]:
    max = a[i]
    max_ind = i
    max2 = max
    max2_ind = max_ind
    
for i in range(n):
  if i = max_ind:
    print(max2)
  else:
    print(max)
Problem p02657 (python)

Fixed submission:
X=input().split(" ")
print(int(X[0])*int(X[1]))

Buggy submission (verdict: Runtime Error):
X=input().split(" ")
print(X[0]*X[1])
Problem p02658 (python)

Fixed submission:
n=int(input())
A=list(map(int,input().split(" ")))
ans=1
POW=pow(10,18)
check=False
answer=1
for i in range(n):
  ans*=A[i]
  if ans>POW:
    ans=0
    check=True
    answer=-1
  if A[i]==0:
    answer=0
if answer<1:
  print(answer)
else:
  print(ans)

Buggy submission (verdict: Runtime Error):
n=int(input())
A=map(int,input().split(" "))
ans=1
POW=pow(10,18)
check=False
for i in range(n):
  ans*=A[i]
  if ans>POW:
    print(-1)
    check=True
    ans=0
if check==False:
  print(ans)
Problem p02660 (python)

Fixed submission:
def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
      cnt=0
      while temp%i==0:
        cnt+=1
        temp //= i
      arr.append(cnt)
  if temp!=1:
    arr.append(1)
  if n==1:
    arr.append(0)
  return arr
def kak(n):
  return ((1+8*n)**(1/2)-1)//2
  
A=factorization(int(input()))
print(int(sum([kak(i) for i in A])))

Buggy submission (verdict: Runtime Error):
def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
      cnt=0
      while temp%i==0:
        cnt+=1
        temp //= i
      arr.append(cnt)
  if temp!=1:
    arr.append(1)
  if n==1:
    arr.append(0)
  return arr
def kak(n):
  return ((1+8*n)**(1/2)-1)//2
  
A=dactorization(int(input()))
print(sum([kak(i) for i in A]))
Problem p02705 (python)

Fixed submission:
from math import pi
R=float(input())
print(2*R*pi)

Buggy submission (verdict: Runtime Error):
X=input().split()
N=int(X[0])
M=int(X[1])
A=list(map(int,input().split()))
y=N-sum(A)
z=0
if y>=0:
  z=y
else:
  z=-1
print(z)

Buggy submission (verdict: Runtime Error):
from math import pi
R=input()
print(2*R*pi)
Problem p02706 (python)

Fixed submission:
X=input().split()
N=int(X[0])
M=int(X[1])
A=list(map(int,input().split()))
y=N-sum(A)
z=0
if y>=0:
  z=y
else:
  z=-1
print(z)

Buggy submission (verdict: Runtime Error):
X=input().split()
N=int(X[0])
M=int(X[1])
A=list(map(int,input().split()))
y=N-sum(A)
if y>=0:
  return y
return -1
Problem p02713 (python)

Fixed submission:
from math import gcd
z=range(1,1+int(input()))
y=0
for a in z:
  for b in z:
    for c in z:
      y+=gcd(gcd(a,b),c)
print(y)

Buggy submission (verdict: Runtime Error):
from math import gcd
z=range(1,1+int(input()))
y=0
for a in z:
  for b in z:
    for c in z:
      y+=reduce(gcd,(a,b,c)
print(y)

Buggy submission (verdict: Runtime Error):
from math import gcd
x=range(int(input()))
y=0
for a in z:
  for b in z:
    for c in z:
      y+=gcd(gcd(a+1,b+1),c+1)
print(y)
Problem p03035 (python)

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

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

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

if a >= 13:
	print(B)
elif a >= 6:
	print(B/2)
else:
	print(0)
Problem p03103 (python)

Fixed submission:
n, m = [int(i) for i in input().split()]
dat = [[int(i) for i in input().split()] for i in range(n)]
dat.sort()
sum = 0
_m = 0
for i in dat:
    if _m + i[1] >= m:
        print(sum + i[0]*(m - _m))
        break
    _m += i[1]
    sum += i[0] * i[1]

Buggy submission (verdict: Runtime Error):
n, m = [int(i) for i in input().split()]
dat = [[int(i) for i in input().split()] for i in range(n)]
sort(dat)
sum = 0
_m = 0
for i in dat:
    _m += dat[1]
    if _m > m:
        print(sum + dat[0]*(m - _m))
        break
    sum += dat[0] * dat[1]
Problem p02658 (python)

Fixed submission:
t = int(input())
list_v = list(map(int,input().split()))
 
res = 1
if 0 in list_v:
  res = 0
else:
  for v in list_v:
    res *= v
    if res > 10**18:
      res = -1
      break
print(res)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
if(0 in a):
  print(0)
else:
  a.sort()
  ans = 1
 
  for i in range(n):
    ans *= a[i]
    if ans > 10 ** 18:
      ans = -1
      break
	print(ans)
Problem p02657 (python)

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

Buggy submission (verdict: Runtime Error):
a = input()
b = input()
print(a*b)
Problem p02882 (python)

Fixed submission:
import math
a,b,X = map(int, input().split())
x = X/(a**2)

if x<=b/2:
        t = 2*a*x/(b**2)
        print(90-math.degrees(math.atan(t)))

else:
        if a**2*b==X:
                print(0)
        else:
                t = a/(2*b-2*x)
                print(90-math.degrees(math.atan(t)))

Buggy submission (verdict: Runtime Error):
import math
a,b,X = map(int, input().split())
x = X/(a**2)

if x<=b/2:
        t = 2*a*x/(b**2)
        print(90-math.degrees(math.atan(t)))

else:
        if (a**2)*b==x:
                print(0)
        else:
                t = a/(2*b-2*x)
                print(90-math.degrees(math.atan(t)))

Buggy submission (verdict: Runtime Error):
import math
a,b,X = map(int, input().split())
x = X/(a**2)

if x<=b/2:
        t = 2*a*x/(b**2)
        print(90-math.degrees(math.atan(t)))

else:
        if a**2*b==x:
                print(0)
        else:
                t = a/(2*b-2*x)
                print(90-math.degrees(math.atan(t)))

Buggy submission (verdict: Runtime Error):
import math
a,b,X = map(int, input().split())
x = X/(a**2)

if x<=b/2:
        t = 2*a*x/(b**2)
        print(90-math.degrees(math.atan(t)))

else:
        if X==x:
                print(0)
        else:
                t = a/(2*b-2*x)
                print(90-math.degrees(math.atan(t)))

Buggy submission (verdict: Runtime Error):
import math
a,b,X = map(int, input().split())
x = X/(a**2)

if x<=b/2:
        t = 2*a*x/(b**2)
        print(90-math.degrees(math.atan(t)))

else:
        t = a/(2*b-2*x)
        print(90-math.degrees(math.atan(t)))
Problem p02947 (python)

Fixed submission:
import math
from operator import mul
from functools import reduce
N = int(input())
ll = []
def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

for i in range(N):
    l = list(input())
    l.sort()
    s = ''.join(l)
    ll.append(s)
ll.sort()
k = 0
ans = 0
for j in range(N-1):
    if ll[j]==ll[j+1]:
        k += 1
    elif k>0:
        ans += cmb(k+1, 2)
        k = 0
if k>0:
    ans += cmb(k+1, 2)
print(int(ans))

Buggy submission (verdict: Runtime Error):
import math
import sys
sys.setrecursionlimit(100000000)
N = int(input())
ll = []

for i in range(N):
    l = list(input())
    l.sort()
    s = ''.join(l)
    ll.append(s)
ll.sort()
k = 0
ans = 0
for j in range(N-1):
    if ll[j]==ll[j+1]:
        k += 1
    elif k>0:
        ans += math.factorial(k+1)/math.factorial(2)/math.factorial(k+1-2)
        k = 0
if k>0:
    ans += math.factorial(k+1)/math.factorial(2)/math.factorial(k+1-2)
print(int(ans))

Buggy submission (verdict: Runtime Error):
import math
N = int(input())
ll = []

for i in range(N):
    l = list(input())
    l.sort()
    s = ''.join(l)
    ll.append(s)
ll.sort()
k = 0
ans = 0
for j in range(N-1):
    if ll[j]==ll[j+1]:
        k += 1
    elif k>0:
        ans += math.factorial(k+1)/math.factorial(2)/math.factorial(k+1-2)
        k = 0
if k>0:
    ans += math.factorial(k+1)/math.factorial(2)/math.factorial(k+1-2)
print(int(ans))
Problem p02983 (python)

Fixed submission:
L, R = map(int ,input().split())
if R-L >= 2019:
    print(0)
else:
    li = []
    for i in range(L, R+1):
        li.append(i%2019)
    l = []
    for i in range(len(li)-1):
        for j in range(i+1,len(li)):
            l.append((li[i]*li[j])%2019)
    a = min(l)

    print((a)%2019)

Buggy submission (verdict: Runtime Error):
L, R = map(int ,input().split())
if R-L >= 2019:
    print(0)
else:
    li = []
    for i in range(L, R+1):
        li.append(i%2019)
    l = []
    for i in range(len(li)-1):
        for j in range(i+1,len(li)):
            l.append((li[i]*li[j])%2019)
    a = min(l)

print((a)%2019)

Buggy submission (verdict: Runtime Error):
L, R = map(int ,input().split())
if R-L >= 2019:
    print(0)
else:
    li = []
    for i in range(L, R+1):
        li.append(i%2019)
    a = min(li)
    li[li.index(a)] += 2019
    b = min(li)

print((a*b)%2019)
Problem p03105 (python)

Fixed submission:
a,b,c=map(int,input().split())
d=b//a
if d<=c:
  print(d)
else:
  print(c)

Buggy submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
print(min(c, b//a)
Problem p03777 (python)

Fixed submission:
a, b = input().split()
print("H" if a == b else "D")

Buggy submission (verdict: Runtime Error):
a, b = input().split()
print("H" if a == b else "D")aa
Problem p03860 (python)

Fixed submission:
s=input()
print("A"+s[8]+"C")

Buggy submission (verdict: Runtime Error):
print("A"%s"C"%input()[8])
Problem p02658 (python)

Fixed submission:
n = int(input())
l = list(map(int, input().split()))
ans = 1

if 0 in l:
  print(0)
  exit()

for i in range(n):
  ans*=l[i]
  if ans > 10**18:
      print(-1)
      exit()

print(ans)

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

if 0 in a:
  print(0)
  exit()

for i in range(n):
  ans*=ans*l[i]
  if ans > 10**18:
      print(-1)
      exit()

print(ans)
Problem p02687 (python)

Fixed submission:
s=input()

if s=='ABC':
  print('ARC')
else:
  print('ABC')

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

for i in range (200):
  for j in range (-200,200):
    if i**5-j**5==x:
      print(i,j)
      exit()
Problem p02690 (python)

Fixed submission:
x=int(input())

for i in range (200):
  for j in range (-200,200):
    if (i**5-j**5)==x:
      print(i,j)
      exit()

Buggy submission (verdict: Runtime Error):
from decimal import *
x=int(input())

for i in range (100):
  h=Decimal(x)-Decimal(i)**Decimal('5')
  if h<=0:
    bh=Decimal(h)**Decimal('0.2')
    if Decimal(bh)%1==0:
      print(i,int(bh))
      exit()
  else:
    hh=abs(h)
    bh=Decimal(hh)**Decimal('0.2')
    if Decimal(bh)%1==0:
      print(i,(-1)*int(bh))
      exit()

Buggy submission (verdict: Runtime Error):
from decimal import *
x=int(input())

for i in range (100):
  h=Decimal(x)-Decimal(i)**Decimal('5')
  if h<0:
    bh=Decimal(h)**Decimal('0.2')
    if Decimal(bh)%1==0:
      print(i,int(bh))
      exit()
  else:
    hh=abs(h)
    bh=Decimal(h)**Decimal('0.2')
    if Decimal(bh)%1==0:
      print(i,(-1)*int(bh))
      exit()
Problem p02741 (python)

Fixed submission:
k=int(input())
l=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]

print(l[k-1])

Buggy submission (verdict: Runtime Error):
k=int(input())
l=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]

print(l[k])
Problem p02743 (python)

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

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
if a**2+b**2+c**2-2*a*b-2*b*c-2*c*a>0:
  if c-a-b>0:
  print('Yes')
  else:
    print('No')
else:
  print ('No')

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
if a**2+b**2+c**2-2*a*b-2*b*c-2*c*a>0:
  if c-a-b>:
  print('Yes')
  else:
    print('No')
else:
  print ('No')
Problem p02767 (python)

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

s=min(l)
g=max(l)
ans=0
for k in range (n):
  ans+=(l[k]-s)**2

for i in range(s+1,g+1):
  hyp=0
  for j in range (n):
    hyp+=(l[j]-i)**2
  if hyp<ans:
    ans=hyp
    
print (ans)

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

s=min(l)
g=max(l)
ans=0
for k in range (n):
  ans+=(l[k]-s)**2

for i in range(s+1,g+1):
  hyp=0
  for j in range (n):
    hyp+=(l[j]-i)**2
  if hyp<ans:
    ans=hyp
    
print (ans)
Problem p02772 (python)

Fixed submission:
a=int(input())
Papers=list(map(int,input().split()))
m=0
for i in range (a):
  if Papers[i] %2==0:
    if not (Papers[i] %3==0 or Papers[i] %5==0):
      m=m+1

if not m==0:
  print("DENIED")
else:
  print("APPROVED")

Buggy submission (verdict: Runtime Error):
a=int(input())
Papers=list(map(int,input().split()))
m=0
for i in range (a):
  if Papers[i] %2==0:
    if not (Papers[i] %3==0 or Papers[i] %5==0):
      m=m+1

if not m=0:
  print("DENIED")
else:
  print("APPROVED")

Buggy submission (verdict: Runtime Error):
a=int(input())
Paper=list(map(int,input().split()))
m=0
for i in range (a):
  if Paper[i]%2==0:
    if not Paper[i]%3==0 or Paper[i]%5==0:
      m=m+1
return m

if not m==0:
  print("DENIED")
else:
  print("APPROVED")

Buggy submission (verdict: Runtime Error):
a=int(input())
Paper=list(map(int,input().split()))
m=0
for i in range (a):
  if Paper[i]%2==0:
    if not Paper[i]%3==0 or Paper[i]%5==0:
      m=m+1
return m

if not m=0:
  print("DENIED")
else:
  print("APPROVED")
Problem p02823 (python)

Fixed submission:
n,a,b = map(int,input().split())
diff = abs(a-b)
if diff%2==0:
    print(diff//2)
else:
    print(min(a-1,n-b)+1+(b-a-1)//2)

Buggy submission (verdict: Runtime Error):
n,a,b = map(int,input().split())
if (a+b)%2==0:
    print(diff//2)
else:
    print(min(a-1,n-b)+1+(b-a-1)//2)
Problem p02899 (python)

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
b = [[0,0] for i in range (n)]
c = []
for i in range(n):
    b[i][1] = a[i]
    b[i][0] = i+1
b.sort(key=lambda x:x[1])
for i in range(n):
    c.append(b[i][0])
print(*c)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
b = [[0,0]　for i in range (n)]
c = []
for i in range(n):
    b[i][1] = a[i]
    b[i][0] = i+1
b.sort(key=lambda x:x[1])
for i in range(n):
    c.append(b[i][0])
print(*c)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
b = [[0,0]*n]
c = []
for i in range(n):
    b[i][1] = a[i]
    b[i][0] = i+1
b.sort(key=lambda x:x[1])
for i in range(n):
    c.append(b[i][0])
print(*c)
Problem p03424 (python)

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

for i in range (n):
  if l[i]=='Y':
    print('Four')
    exit()
print('Three')

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

for i in range (n):
  if l[i]=='Y':
    print('Four')
    exit()
print('Three')
Problem p03502 (python)

Fixed submission:
x=input()
f=0
for i in range(len(x)):
  f+=int(x[i])
  
if int(x)%f==0:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
x=input()
f=0
for i in range(len(x)):
  f+=int(x[i])
  
if x%f==0:
  print('Yes')
else:
  ('No')
Problem p04044 (python)

Fixed submission:
n,l=map(int,input().split())
s=[input() for _ in range (n)]

s.sort()

ans=s[0]
for i in range (1,n):
  ans+=s[i]
  
print(ans)

Buggy submission (verdict: Runtime Error):
n,l=map(int,input().split)
s=[input() for _ in range (n)]

s.sort()

ans=s[0]
for i in range (1,n):
  ans+=s[i]
  
print(ans)
Problem p03999 (python)

Fixed submission:
a = input()
ar = []
for i in range(len(a)):
    ar.append(a[i])
n = len(ar)
ret = 0
for i in range(2**(n-1)):
    s = "+"
    tmp = ""
    for j in range(n):
        if (1 & (i >> j)) == 1:
            tmp += ar[j]
            tmp += s
        else:
            tmp += ar[j]
    stmp = tmp.split("+")
    ret += sum(int(k) for k in stmp)
print(int(ret))

Buggy submission (verdict: Runtime Error):
a = input()
ar = []
for i in range(3):
    ar.append(a[i]) 
n = len(ar)
ret = 0
for i in range(n+1):
    s = "+"
    tmp = ""
    for j in range(n):
        if (1 & (i >> j)) == 1:
            tmp += ar[j]
            tmp += s
        else:
            tmp += ar[j]
    stmp = tmp.split("+")
    ret += sum(int(k) for k in stmp)
print(int(ret))

Buggy submission (verdict: Runtime Error):
a = input()
ar = []
for i in range(3):
    ar.append(a[i]) 
n = len(ar)
ret = 0
for i in range(n+1):
    s = "+"
    tmp = ""
    for j in range(n):
        if (1 & (i >> j)) == 1:
            tmp += ar[j]
            tmp += s
        else:
            tmp += ar[j]
    stmp = tmp.split("+")
    ret += sum(int(k) for k in stmp)
print(ret)
Problem p02657 (python)

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

print(a*b)

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

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

Buggy submission (verdict: Runtime Error):
s=str(input())
if s=="ABC":
  print(“ARC”)
else:
  print(“ABC”)
Problem p02657 (python)

Fixed submission:
a,b=(int(x) for x in input().split())
print(a * b)

Buggy submission (verdict: Runtime Error):
a = input()
b = input()
print(int(a) * int(b))
Problem p02817 (python)

Fixed submission:
a,b= input().split()
c = b + a
print(c)

Buggy submission (verdict: Runtime Error):
a,b,k =  input().split()
a = int(a)
b = int(b)
k = int(k)
if a <= k:
    i = 0
    m = b - (k-a)
else:
    i = a-k
    m=b
print(i,m)
Problem p02657 (python)

Fixed submission:
ab = input( )

ab = ab.split()
print(int(ab[1])*int(ab[0]))

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

ab = input( )

ab = ab.split()

if 0 in ab:
    print(0)
else:
    SUM = 1
    for i in range(int(N)):
        SUM = SUM * int(ab[i])

    if (int(SUM) < 10 ** 18):
        print(SUM)
    else:
        print(-1)

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


seki = int(a)*int(b)
print(seki)

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

seki = int(a)*int(b)
print(seki)