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

Fixed submission:
N = int(input())
H = list(map(int, input().split(" ")))
H.reverse()
H.append(float('inf'))	# sentinel value
ans = 0
ind, counter = 0, 0

while ind < N:
  if H[ind] <= H[ind + 1]:
    counter += 1
    ind += 1
  else:
    ans = max(ans, counter)
    counter = 0
    ind += 1
print(max(ans, counter - 1))

Buggy submission (verdict: Runtime Error):
N = int(input())
H = [int(s) for s in input().split(" ")]

ans = 0
st = 0
for i in range(1, N):
  if H[i] - H[i - 1] > 0:
    ans = max(i - st - 1, ans)
    st = i

ans = max(ans, i - st)
print(ans)
Problem p02946 (python)

Fixed submission:
K, X = map(int, input().split(" "))
print(' '.join([str(k) for k in range(X - K + 1, X + K)]))

Buggy submission (verdict: Runtime Error):
K, X = map(int, input().split(" "))
print(' '.join([k for k in range(X - K + 1, X + K)]))
Problem p03109 (python)

Fixed submission:
S = list(map(int, input().split("/")))
if S[1] >= 5:
  print("TBD")
else:
  print("Heisei")

Buggy submission (verdict: Runtime Error):
S = map(int, input().split("/"))
if S[1] >= 5:
  print("TBD")
else:
  print("Heisei")

Buggy submission (verdict: Runtime Error):
S = input().split("/")
if S[1] >= 5:
  print("TBD")
else:
  print("Heisei")
Problem p03136 (python)

Fixed submission:
N = int(input())
L = [int(s) for s in input().split(" ")]
max_L = 0
sum_L = 0
for l in L:
  if l > max_L:
    max_L = l
  sum_L += l
 
if sum_L - max_L > max_L:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N = int(input())
max_L = 0
sum_L = 0
for i in range(0, N):
  L = int(input())
  if L > max_L:
    max_L = L
  sum_L += L

if sum_L - max_L > max_L:
  print("Yes")
else:
  print("No")
Problem p03177 (python)

Fixed submission:
import numpy as np
mod = 10 ** 9 + 7


def matpow(A, x):
    if x == 1:
        return A % mod
    elif x % 2 == 0:
        return matpow(np.linalg.matrix_power(A, 2) % mod, x // 2)
    else:
        ans = matpow(np.linalg.matrix_power(A, 2) % mod, x // 2)
        ans = ans.dot(A) % mod
        return ans


N, K = map(int, input().split(" "))
A = []
for _ in range(N):
    A.append(list(map(int, input().split(" "))))

A = np.array(A, dtype=object)
print(np.sum(matpow(A, K) % mod) % mod)

Buggy submission (verdict: Runtime Error):
import numpy as np
mod = 10 ** 9 + 7


def matpow(A, x):
    if x == 1:
        return A % mod
    elif x % 2 == 0:
        return matpow(np.linalg.matrix_power(A, 2) % mod, x // 2)
    else:
        ans = matpow(np.linalg.matrix_power(A, 2) % mod, x // 2)
        ans = ans.dot(A) % mod
        return ans


N, K = map(int, input().split(" "))
A = []
for _ in range(N):
    A.append(list(map(int, input().split(" "))))

A = np.array(A, dtype=np.int64)
print(np.sum(matpow(A, K) % mod) % mod)
Problem p03284 (python)

Fixed submission:
N, K = map(int, input().split(" "))
print(0 if N%K == 0 else 1)

Buggy submission (verdict: Runtime Error):
N, K = int(input())
print(0 if N%K == 0 else 1)
Problem p03324 (python)

Fixed submission:
D, N = map(int, input().split(" "))
if N == 100:
  N += 1
print(N*100**D)

Buggy submission (verdict: Runtime Error):
D, N = input().split(" ")
D = int(D)
if int(N) == 100:
  N[2] = "1"
print(N+"0"*(2*D))
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(''))
print(int((a+b+1)/2))

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
print(int((a+b+1)/2))
Problem p03487 (python)

Fixed submission:
import collections

N = int(input())
a = [int(i) for i in input().split(" ")]
c = collections.Counter(a)
ans = 0

for key,val in c.items():
    d = val
    if val >= key:
        d = min(val-key,val)
    ans += d

print(ans)

Buggy submission (verdict: Runtime Error):
import collections

N = int(input())
a = [int(i) for i in input().split(" ")]
c = collections.Counter(a)
ans = 0

for key,val in c.items():
    del = max(val-key,val)
    if key == val:
        del = 0
    ans += del

print(ans)
Problem p03488 (python)

Fixed submission:
s = input()
x,y = map(int,input().split(" "))
l = [len(c) for c in s.split("T")]
X = l[::2]
Y = l[1::2]

ansX = [X[0]]
for i in range(1,len(X)):
    if not X[i] == 0:
        ansX = list(set([c+X[i] for c in ansX]+[c-X[i] for c in ansX]))

ansY = [0]
for i in range(0,len(Y)):
    if not Y[i] == 0:
        ansY = list(set([c+Y[i] for c in ansY]+[c-Y[i] for c in ansY]))
    
if x in ansX and y in ansY:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
s = input()
x,y = map(int,input().split(" "))
l = [len(c) for c in s.split("T")]
X = l[::2]
Y = l[1::2]

ansX = set([X[0]])
for i in range(1,len(X)):
    ansX = set([c+X[i] for c in ansX]+[c-X[i] for c in ansX]))

ansY = set([0])
for i in range(0,len(Y)):
    ansY = set([c+Y[i] for c in ansY]+[c-Y[i] for c in ansY]))
    
if x in ansX and y in ansY:
    print("Yes")
else:
    print("No")
Problem p03543 (python)

Fixed submission:
N = input()
if (N[0] == N[1] and N[1] == N[2]) or (N[1] == N[2] and N[2] == N[3]):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N = input()
if len(set(N[0:2])) == 1 || len(set(N[1:3])):
  print("Yes")
else:
  print("No")
Problem p03569 (python)

Fixed submission:
def solve(s):
    l, r = 0, len(s) - 1

    ans = 0
    while l < r:
        if s[l] != s[r] and s[l] != 'x' and s[r] != 'x':
            return -1
        if s[l] == s[r]:
            l += 1
            r -= 1
        elif s[l] == 'x':
            ans += 1
            l += 1
        elif s[r] == 'x':
            ans += 1
            r -= 1
    return ans


if __name__ == '__main__':
    print(solve(input()))

Buggy submission (verdict: Runtime Error):
def solve(s):
    l, r = 0, len(s) - 1

    ans = 0
    while l != r:
        if s[l] != s[r] and s[l] != 'x' and s[r] != 'x':
            return -1
        if s[l] == s[r]:
            l += 1
            r -= 1
        elif s[l] == 'x':
            ans += 1
            l += 1
        elif s[r] == 'x':
            ans += 1
            r -= 1
    return ans


if __name__ == '__main__':
    print(solve(input()))
Problem p03612 (python)

Fixed submission:
N = int(input())
p = [int(i) for i in input().split(" ")]
ans = 0

for i in range(0,N):
    if p[i] == (i+1):
        if i == N-1:
            ans += 1
        elif p[i+1] == (i+2):
            t = p[i]
            p[i] = p[i+1]
            p[i+1] = t
            ans += 1
        else:
            ans += 1
            t = p[i]
            p[i] = p[i+1]
            p[i+1] = t
            
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
p = [int(i) for i in input().split(" ")]
ans = 0

for i in range(0,N):
    if p[i] == (i+1):
        if p[i+1] == (i+2):
            t = p[i]
            p[i] = p[i+1]
            p[i+1] = t
            ans += 1
        else:
            ans += 1
            d = -1 if i == N-1 else 1
            t = p[i]
            p[i] = p[i+d]
            p[i+d] = t
            
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
p = [int(i) for i in input().split(" ")]
ans = 0

for i in range(0,N):
    if p[i] == (i+1):
        if p[i+1] == (i+1):
            t = p[i]
            p[i] = p[i+1]
            p[i+1] = t
            ans += 1
        else:
            ans += 1
            d = -1 if i == N-1 else 1
            t = p[i]
            p[i] = p[i+d]
            p[i+d] = t
            
print(ans)
Problem p03651 (python)

Fixed submission:
import fractions

N, K = map(int, input().split(" "))
A = list(map(int, input().split(" ")))
A.sort()
diff = 10 ** 9

if max(A) < K:
    print('IMPOSSIBLE')
else:
    gcd = max(A)
    for i in range(N):
        gcd = fractions.gcd(gcd, A[i])

    if K % gcd == 0:
        print('POSSIBLE')
    else:
        print('IMPOSSIBLE')

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split(" "))
A = list(map(int, input().split(" ")))
A.sort()
diff = 10 ** 9

for i in range(N - 1):
    diff = min(A[i + 1] - A[i], diff)

if abs(A[0] - diff) > 0:
    diff = min(abs(A[0] - diff), diff)

can_make = False
for i in range(N):
    if A[i] % diff == K % diff and A[i] >= K:
        can_make = True

if can_make:
    print('POSSIBLE')
else:
    print('IMPOSSIBLE')
Problem p03965 (python)

Fixed submission:
S = input()
N = len(S)
print(N // 2 - sum([int(s == 'p') for s in S]))

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

dp = {i:dict() for i in range(len(s))}
def f(i, g):
    if i == len(s):
        return 0
    if g in dp[i]:
        return dp[i][g]
    p = i - g
    ans = (-1 if s[i] == 'p' else 0) + f(i + 1, g + 1)
    if p + 1 <= g:
        ans = max(ans, (1 if s[i] == 'g' else 0) + f(i + 1, g))
    dp[i][g] = ans
    return ans


print(f(0, 0))
Problem p02576 (python)

Fixed submission:
import math

n,x,t = map(int,input().split())
print(math.ceil(n/x)*t)

Buggy submission (verdict: Runtime Error):
import sys
import os
import math
f = open('test01.txt', 'r')
sys.stdin = f

n,x,t = map(int,input().split())
print(math.ceil(n/x)*t)
Problem p03061 (python)

Fixed submission:
import fractions
from functools import reduce

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

#累積GCD
left = [0] * (n + 1)
right = [0] * (n + 1)
for i in range(n):
    #left.append(math.gcd(left[i],a[i]))
    left[i + 1] = (fractions.gcd(left[i],a[i]))
    #right.insert(0,math.gcd(right[0],a[n - 1 - i]))
    right[n - i - 1] = (fractions.gcd(right[n - i],a[n - 1 - i]))
#print(left)
#print(right)

ans = 0
for i in range(n):
    ans = max(ans,fractions.gcd(left[i],right[i + 1]))
print(ans)

Buggy submission (verdict: Runtime Error):
import fractions
from functools import reduce

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

#累積GCD
left = [0] * (n + 1)
right = [0] * (n + 1)
for i in range(n):
    #left.append(math.gcd(left[i],a[i]))
    left[i + 1] = (fractions.gcd(left[i],a[i]))
    #right.insert(0,math.gcd(right[0],a[n - 1 - i]))
    right[n - i - 1] = (fractions.gcd(right[n - i],a[n - 1 - i]))

ans = 0
for i in range(n - 1):
    ans = max(ans,math.gcd(left[i],right[i + 1]))
print(ans)

Buggy submission (verdict: Runtime Error):
    import fractions
    from functools import reduce
     
    n = int(input())
    a = list(map(int,input().split()))
     
    #累積GCD
    left = [0] * (n + 1)
    right = [0] * (n + 1)
    for i in range(n):
        left[i + 1] = (math.gcd(left[i],a[i]))
        right[n - i - 1] = (math.gcd(right[n - i],a[n - 1 - i]))
     
    ans = 0
    for i in range(n - 1):
        ans = max(ans,fractions.gcd(left[i],right[i + 1]))
    print(ans)

Buggy submission (verdict: Runtime Error):
import math
from functools import reduce

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

n = int(input())
a = list(map(int,input().split()))
max = 0
for i in range(n):
    li = a[:i] + a[i + 1:]
    tmp = gcd_list(li)
    if tmp > max:
        max = tmp
print(max)
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())
a = int(input())
b = int(input())
if n == 1:
  print("Hello World")
else:
  print(a + b)
Problem p02576 (python)

Fixed submission:
n,x,t=list(map(int,input().split()))
a=n%x
b=n//x
 
if a==0:
  c=b*t
else:
  c=(b+1)*t
print(c)

Buggy submission (verdict: Runtime Error):
n,x,t=list(map(int,input().split()))
a=n%x
b=n//x

if a==0:
  c=b*t
else :
  c=(b+1)*t
print(C)

Buggy submission (verdict: Runtime Error):
1=<N,X,T=<1000
number =N/X
number =round(number)
time = number*T
print(time)
Problem p02606 (python)

Fixed submission:
l, r, d = map(int, input().split())
print(r//d - (l-1)//d)

Buggy submission (verdict: Runtime Error):
n = int(input())
ans = [0 for _ in range(10050)]
for i in range(1,105):
	for j in range(1,105):
		for k in range(1,105):
			v = i*i+j*j+k*k+i*j+j*k+k*i;
			if v<10050:
				ans[v]+=1

for i in range(n):
	print(ans[i+1])

Buggy submission (verdict: Runtime Error):
n = int(input())
ans = [0 for _ in range(10050)]
for i in range(1,105):
	for j in range(1,105):
		for k in range(1,105):
			v = i*i+j*j+k*k+i*j+j*k+k*i;
			if v<10050:
				ans[v]+=1
                
for i in range(n):
	print(ans[i+1])

Buggy submission (verdict: Runtime Error):
n = int(input())
ans = [0 for _ in range(10050)]
for i in range(1,105):
    for j in range(1,105):
        for k in range(1,105):
            v=i*i+j*j+k*k+i*j+j*k+k*i;
            if v<10050:
            	ans[v]+=1
for i in range(n):
	print(ans[i+1])

Buggy submission (verdict: Runtime Error):
n = int(input())
ans = [0 for _in range(10050)]
for i in range(1,105):
    for j in range(1,105):
        for k in range(1,105):
            v=i*i+j*j+k*k+i*j+j*k+k*i;
            if v<10050:
            	ans[v]+=1
for i in range(n):
	print(ans[i+1])

Buggy submission (verdict: Runtime Error):
n = int(input())
ans = [0 for _ in range(10050)]
	for i in range(1,105):
    	for j in range(1,105):
        	for k in range(1,105):
            	v=i*i+j*j+k*k+i*j+j*k+k*i;
              	if v<10050:
                  ans[v]+=1
 
for i in range(n):
	print(ans[i+1])

Buggy submission (verdict: Runtime Error):
l,r,d=map(int.input().split())
print(r//d-(l-1)//d)

Buggy submission (verdict: Runtime Error):
map(int,input().spilit())
print(r//d-(l-1)//d)
Problem p02608 (python)

Fixed submission:
n=int(input())
ans = [0 for _ in range(10050)]
for i in range(1,105):
	for j in range(1,105):
		for k in range(1,105):
			v = i*i+j*j+k*k+i*j+j*k+k*i;
			if v<10050:
				ans[v]+=1

for i in range(n):
	print(ans[i+1])

Buggy submission (verdict: Runtime Error):
n=int(input())
ans = [0 for _in range(10050)]
	for i in range(1,105):
    	for j in range(1,105):
        	for k in range(1,105):
            	v=i*i+j*j+k*k+i*j+j*k+k*i;
              	if v<10050:
                  ans[v]+=1

for i in range(n):
  print(ans[i+1])
Problem p02612 (python)

Fixed submission:
n = int(input())

if n % 1000 == 0:
  print(0)
else:
  print(1000-(n%1000))

Buggy submission (verdict: Runtime Error):
N = int(input())
G0, G1, G2, G3 = 0, 0, 0, 0
for i in range(N):
    Si = input()
    if Si == 'AG':
        G0 += 1
 
    elif Si == 'WA':
        G1  += 1
 
    elif Si == 'TLE':
        G2 += 1
 
    else:
        G3 += 1
 
print('AG x ' + str(G0))
print('WA x ' + str(G1))
print('TLE x ' + str(G2))
print('RE x ' + str(G3))

Buggy submission (verdict: Runtime Error):
N = int(input())
C0, C1, C2, C3 = 0, 0, 0, 0
for i in range(N):
    Si = input()
    if Si == 'AC':
        C0 += 1
 
    elif Si == 'WA':
        C1  += 1
 
    elif Si == 'TLE':
        C2 += 1
 
    else:
        C3 += 1
 
print('AC x ' + str(C0))
print('WA x ' + str(C1))
print('TLE x ' + str(C2))
print('RE x ' + str(C3))

Buggy submission (verdict: Runtime Error):
N = int(input())
x0,x1,x2,x3=0,0,0,0
for i in range(N):
    Si=input()
    if Si == 'AC':
        x0 = x0+1

    elif Si=='WA':
        x1=x1+1

    elif Si=='TLE':
        x2=x2+1
    
    else:
        x3=x3+1
 
print('AC x' +str(x0))
print('WA x' +str(x1))
print('TLE x'+str(x2))
print('RE x' +str(x3))

Buggy submission (verdict: Runtime Error):
import math
 
N=int(input())
if N%1000==0:
  print(0)
elif N<1000:
  N=1000-N
  print(N)
else:
  N=(math.ceil(money/1000))*1000-N
  print(N)

Buggy submission (verdict: Runtime Error):
import math
 
N=int(input())
if N%1000==0:
  print(0)
else:
  N=(math.ceil(money/1000))*1000-N
  print(int(N))

Buggy submission (verdict: Runtime Error):
import math
 
N=int(input())
if N%1000==0:
  print(0)
else:
   N=(math.ceil(money/1000))*1000-N
  print(N)

Buggy submission (verdict: Runtime Error):
import math
 
money=int(N)
if money%1000==0:
  print(0)
else:
  money=(math.ceil(money/1000))*1000-money
  print(money)

Buggy submission (verdict: Runtime Error):
import math

money=N
if money%1000==0:
  print(0)
else:
  money=(math.ceil(money/1000))*1000-money
  print(money)

Buggy submission (verdict: Runtime Error):
if N%1000==0:
  print(0)
else:
  N=math.ceil(N/1000)*1000-N
  print(N)

Buggy submission (verdict: Runtime Error):
N=int(input())
if N/1000==0:
	N=0
else:
	N=(math.ceil(N/1000)+1)*1000-N
print(str(N))

Buggy submission (verdict: Runtime Error):
if N/1000==0:
	N=0
else:
	N=(math.ceil(N/1000)+1)*1000-N
print("N")
Problem p02613 (python)

Fixed submission:
N = int(input())
C0, C1, C2, C3 = 0, 0, 0, 0
for i in range(N):
    Si = input()
    if Si == 'AC':
        C0 += 1
 
    elif Si == 'WA':
        C1  += 1
 
    elif Si == 'TLE':
        C2 += 1
 
    else:
        C3 += 1
 
print('AC x ' + str(C0))
print('WA x ' + str(C1))
print('TLE x ' + str(C2))
print('RE x ' + str(C3))

Buggy submission (verdict: Runtime Error):
N=int(input())
x0,x1,x2,x3=0,0,0,0
 
for i in range(N)
	Si=input()
  	if Si=='AC':
      x0=x0+1
    
    elif Si=='WA':
      x1=x1+1
    
    elif Si=='TLE':
      x2=x2+1
    
    else Si=='RE':
      x3=x3+1
 
print('AC x' str(x0))
print('WA x' str(x1))
print('TLE x' str(x2))
print('RE x' str(x3))

Buggy submission (verdict: Runtime Error):
N=int(input())
x0,x1,x2,x3=0,0,0,0

for i in range(N)
	Si=input()
  	if Si=='AC':
      x0=x0+1
    
    if Si=='WA':
      x1=x1+1
    
    if Si=='TLE':
      x2=x2+1
    
    if Si=='RE':
      x3=x3+1

print('AC x' str(x0)
print('WA x' str(x1)
print('TLE x' str(x2)
print('RE x' str(x3))
Problem p02658 (python)

Fixed submission:
n = int(input())
arr = list(map(int, input().split()))
if 0 in arr:
    print('0' + '\n')
else:
    mul = 1
    for n in arr:
        mul *= n
        if mul > 10**18:
            print('-1' + '\n')
            break
    else:
        print(str(mul) + '\n')

Buggy submission (verdict: Runtime Error):
n = int(input())
arr = list(map(int, input().split()))
if 0 in arr:
    print(0 + '\n')
else:
    mul = 1
    for n in arr:
        mul *= n
        if mul > 10**18:
            print(-1 + '\n')
            break
    else:
        print(mul + '\n')
Problem p02657 (python)

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

Buggy submission (verdict: Runtime Error):
A,B = list(map(int,inpuut().split()))
print(A*B)
Problem p02658 (python)

Fixed submission:
N = int(input())
L = list(map(int,input().split()))
L.sort()
c = 1
for i in range(N):
    c *= L[i]
    if c > 10**18:
        c = -1
        break
print(c)

Buggy submission (verdict: Runtime Error):
N = int(input())
li = []
C = 1
while C <= 10**18:
	for i in range(N):
		li.insert(i,int(input())
    	C *= li[i]
if C <= 10**18:
	print(C)
else: print(-1)

Buggy submission (verdict: Runtime Error):
N = int(input())
li = list(map(int,input()))
C = 1
for i in range(N):
  C *= li[i]
if C <= 10 ** 18:
  print(C)
else: print(-1)
Problem p02576 (python)

Fixed submission:
N,X,T= map(int, input().split())
if N%X==0:
  print((N//X)*T)
else:
  print(((N//X)+1)*T)

Buggy submission (verdict: Runtime Error):
N,X,T= map(int, input().split())
if N%X==0:
  print((N/X)*T)
else:
  print(N/X +1)*T)

Buggy submission (verdict: Runtime Error):
N,X,T=int(input())
if  N%X==0:
  print((N/X)*T)
else:
  print((N/X +1)*T)
Problem p02584 (python)

Fixed submission:
x, k ,d = map(int, input().split())
x=abs(x)
if k*d <= x:
    print(x-k*d)
else:
    xx = x
    x -= min(k, x//d)*d
    k -= min(k, xx//d)
    if k % 2 != 0:
        ans = min(abs(x-d),abs(x+d))
    else:
        ans = min(abs(x), abs(x-2*d))
    print(ans)

Buggy submission (verdict: Runtime Error):
x, k ,d = map(int, input().split())
a=[0]*(k+1)
a[0] = x
for i in range(1,k+1):
    a[i] = min(abs(a[i-1]-d), abs(a[i-1]+d))
print(a[k])
Problem p02658 (python)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
a.sort()
ans=1
for i in a:
    ans*=i
    if ans>10**18:
        ans=-1
        break
print(ans)

Buggy submission (verdict: Runtime Error):
n=int(input())
arr=[]
arr=list(map(int,input().split()))
mul=1
for i in range(n):
  mul*=arr[i]
  if(mul>1000000000000000000):
    print("-1")
    return
print(mul)
Problem p02583 (python)

Fixed submission:
n = int(input())
l = list(map(int,input().split()))
if len(l) < 3:
  print(0)
  exit()
count = 0
l = sorted(l)
for i in range(n):
  for j in range(i+1,n):
    for k in range(j+1,n):
      if l[i] != l[j] != l[k] and l[i]+l[j] > l[k]:
        count += 1
print(count)

Buggy submission (verdict: Runtime Error):
n = int(input())
l = map(int,input().split())
if len(l) < 3:
  print(0)
  exit()
count = 0
l = sorted(l)
for i in range(n):
  for j in range(i+1,n):
    for k in range(j+1,n):
      if l[i] != l[j] != l[k] and l[i]+l[j] > l[k]:
        count += 1
print(count)

Buggy submission (verdict: Runtime Error):
n = int(input())
l = map(int,input().split())
count = 0
if len(l) < 3:
  print(0)
  exit()
l = sorted(l)
for i in range(n):
  for j in range(i+1,n):
    for k in range(j+1,n):
      if l[i] != l[j] != l[k] and l[i]+l[j] > l[k]:
        count += 1
print(count)
Problem p02639 (python)

Fixed submission:
a=input()
l=a.split(" ")
b=l.index("0")
print(b+1)

Buggy submission (verdict: Runtime Error):
a = input()
l = a.split("")
b = l.index("0")
print(b+1)
Problem p02640 (python)

Fixed submission:
x,y = map(int,input().split())
if 2*x <= y <= 4*x and y %2 == 0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
x,y = map(int,input().split())
if 2*x <= y <= 4x and y %2 =0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
x,y = map(int,input().split())
if 2*x <= y <= 4x and y %2 =0:
  print("Yes")
else:
  print("No")
Problem p02687 (python)

Fixed submission:
S = 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 p02705 (python)

Fixed submission:
R = int(input())
print(2*3.14*R)

Buggy submission (verdict: Runtime Error):
R = input()
print(2*3.14*R)
Problem p02783 (python)

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

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

Fixed submission:
n = int(input())
p = list(map(int,input().split()))
 
ans = 0
 
for i in range(1,n-1):
  if p[i-1]<p[i]<p[i+1] or p[i+1]<p[i]<p[i-1]:
    ans += 1
    
print(ans)

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

ans = 0

for i in range(1,n-1):
  if p[i-1]<p[i]<p[i+1] or p[i+1]<p[i]<p[i-1]:
    ans += 1
    
print(ans)
Problem p02817 (python)

Fixed submission:
S,T=input().split()
print(T+S)

Buggy submission (verdict: Runtime Error):
S,T=map(string,input().split())
ans=T+S
print(ans\n)

Buggy submission (verdict: Runtime Error):
S,T=map(string, input().split())
print(S+T)
Problem p02934 (python)

Fixed submission:
n=int(input())
a=[int(x) for x in input().split()]
c=0
for i in range(n):
  c+=a[i]**(-1)
print(c**(-1))

Buggy submission (verdict: Runtime Error):
n=int(input())
a=[int(x) for x in input().split()]
c=0
for i in range(n):
  c+=1//a[i]
print(1//c)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=[int(x) for x in input().split()]
c=0
for i in range(n):
  c+=1//i
print(1//c)
Problem p03060 (python)

Fixed submission:
n=int(input())
v=[int(x) for x in input().split()]
c=[int(x) for x in input().split()]
s=0
for i in range(n):
  d=v[i]-c[i]
  if d>0:
    s+=d
print(s)

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

Fixed submission:
n=int(input())
a=[int(x) for x in input().split()]
a.sort(reverse=True)
alice=0
bob=0
for i in range(0,n,2):
  alice+=a[i]
for i in range(1,n,2):
  bob+=a[i]
print(alice-bob)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=(int(x) for x in input().split())
a.sort(reverse=True)
alice=0
bob=0
for i in range(0,n,2):
  alice+=a[i]
for i in range(1,n,2):
  bob+=a[i]
print(alice-bob)