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

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
A = A
dp = [[0] * (N+1) for _ in range(N+1)]

for i in range(N+1):
    dp[i][i] = 0

for k in range(1,N+1):#区間の残り数
    for i in range(N):#左端
        x = i+k#右端
        if x > N:
            continue
        elif (N-k) % 2 == 0:#太郎
            #print(i,x)
            dp[i][x] = max(dp[i+1][x] + A[i], dp[i][x-1] + A[x-1])
        elif (N-k) % 2 == 1:#次郎
            #print(i,x)
            dp[i][x] = min(dp[i+1][x] - A[i], dp[i][x-1] - A[x-1])
            
print(dp[0][N])

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
A = [0]
dp = [[0] * (N+1) for _ in range(N+1)]

#半開区間で考える⇒[i,j)での最適解
for w in range(1,N+1):#区間の残り数
    for l in range(N):# 左端
        r = l + w#右端
        if r > N:
            continue
        elif (N-k) % 2 == 0:#太郎
            #print(i,x)
            dp[l][x] = max(dp[l+1][x] + A[l], dp[l][r-1] + A[r-1])
        elif (N-k) % 2 == 1:#次郎
            #print(i,x)
            dp[l][x] = min(dp[l+1][x] - A[l], dp[l][r-1] - A[r-1])
            
print(dp)
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=int(input())
  b=int(input())
  print(a+b)
Problem p03455 (python)

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

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

Buggy submission (verdict: Runtime Error):
a,b = int(input())
if a*b % 2 = 1:
  print("Odd")
else:
  print("Even")
Problem p03493 (python)

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

Buggy submission (verdict: Runtime Error):
n = int(input())
print(n.count("1"))

Buggy submission (verdict: Runtime Error):
n = int(input())
print(n , count("1"))

Buggy submission (verdict: Runtime Error):
a, b, c,= map(int, input().split())
n = 0
if a = 1:
  n = n + 1
elif b = 1:
  n = n + 1
elif c = 1:
  n = n + 1
print(n)
Problem p03607 (python)

Fixed submission:
import collections

N = int(input())
L = [int(input()) for i in range(N)]

M = collections.Counter(L)
C = M.most_common()
cnt = 0

for x in C:
    if x[1] % 2 == 1:
        cnt += 1
        
print(cnt)

Buggy submission (verdict: Runtime Error):
N = int(input())
L = [0] * (100000+1)
for i in range(N):
    a = int(input())
    L[a] = L[a]+1
cnt = 0
for x in L:
    if x %2 == 1:
        cnt += 1
print(cnt)
Problem p03665 (python)

Fixed submission:
N, P = map(int,input().split())
A = list(map(int,input().split()))
even = 0
odd = 0

for i in A:
    if i % 2 == 0:
        even += 1
    else:
        odd += 1
#print(even,odd)

import math
def Perm(n, r):
    return math.factorial(n)//math.factorial(n-r)
def comb(n, r):
    return Perm(n, r)//math.factorial(r)

#print("0,0 = ", comb(0,0))

if P == 0:
    ans = 0
    for x in range(odd+1):
        #print(odd, x)
        if x % 2 == 0:
            ans += comb(odd,x)
    ans *= 2**even
    print(ans)
else:
    ans = 0
    for x in range(odd+1):
        if x % 2 == 1:
            if odd != 0:
                ans += comb(odd,x)
    ans *= 2**even
    print(ans)

Buggy submission (verdict: Runtime Error):
N, P = map(int,input().split())
A = list(map(int,input().split()))
even = 0
odd = 0

for i in A:
    if i % 2 == 0:
        even += 1
    else:
        odd += 1
#print(even,odd)

import math
def Perm(n, r):
    return math.factorial(n)//math.factorial(n-r)
def comb(n, r):
    return Perm(n, r)//math.factorial(r)

#print("0,0 = ", comb(0,0))

if P == 0:
    ans = 0
    for x in range(odd+2):
        #print(odd, x)
        if x % 2 == 0:
            ans += comb(odd,x)
    ans *= 2**even
    print(ans)
else:
    ans = 0
    for x in range(odd+1):
        if x % 2 == 1:
            if odd != 0:
                ans += comb(odd,x)
    ans *= 2**even
    print(ans)
Problem p03699 (python)

Fixed submission:
N = int(input())
L = [0] * N
for i in range(N):
    L[i] = int(input())

ten = []
non = []
for i in L:
    if i % 10 == 0:
        ten.append(i)
    else:
        non.append(i)
if (sum(ten) + sum(non))%10 != 0:
    print(sum(ten) + sum(non))
elif non == []:
    print(0)
else:
    print((sum(ten) + sum(non))-min(non))

Buggy submission (verdict: Runtime Error):
N = int(input())
L = [0] * N
for i in range(N):
    L[i] = int(input())

ten = []
non = []
for i in L:
    if i % 10 == 0:
        ten.append(i)
    else:
        non.append(i)
if (sum(ten) + sum(non))%10 != 0:
    print(sum(ten) + sum(non))
else:
    print((sum(ten) + sum(non))-min(non))
Problem p03910 (python)

Fixed submission:
#import itertools
#import bisect
import math

N = int(input())
L = [i for i in range((N+2)//2+2)]
num = math.floor(pow(2*(N-1),0.5))
    
for i in range(num,len(L)):
    if N == i*(i+1)//2:
        index = i
        Max = i*(i+1)//2
        break
    elif N < i*(i+1)//2:
        index = i
        Max = i*(i+1)//2
        break
Left = Max - N 
#print(num,Left,Max,index,L)
#acu = list(itertools.accumulate([i for i in range((N+1)//2+2)]))
#print(acu) 
#index = bisect.bisect_left(acu,N)
#print(index)
 
#if acu[index] == N:
#    Max = acu[index-1]
#else:
#    Max = acu[index]
#Left = Max - N

for i in range(1,index+1):
    if i == Left:
        continue
    print(i)

Buggy submission (verdict: Runtime Error):
#import itertools
#import bisect
import math

N = int(input())
L = [i for i in range((N+1)//2+1)]
num = math.ceil(pow(2*(N-1),0.5))
    
for i in range(num,len(L)):
    if N == i*(i+1)//2:
        index = i
        Max = i*(i+1)//2
        break
    elif N < i*(i+1)//2:
        index = i
        Max = i*(i+1)//2
        break
Left = Max - N 
    
#acu = list(itertools.accumulate([i for i in range((N+1)//2+2)]))
#print(acu) 
#index = bisect.bisect_left(acu,N)
#print(index)

Left = Max - N    
#if acu[index] == N:
#    Max = acu[index-1]
#else:
#    Max = acu[index]
#Left = Max - N

for i in range(1,index+1):
    if i == Left:
        continue
    print(i)
Problem p03999 (python)

Fixed submission:
S = input()
Ans = 0
box = []

for i in range(2 ** (len(S)-1)):  # 文字の間に挿入するので、len(S)-1
    for j in range((len(S)-1)):
        box.append(S[j])
        
        if (i >> j) & 1:
            Ans += int("".join(box))
            box.clear()
            
    box.append(S[-1])
    Ans += int("".join(box))
    box.clear()

print(Ans)

Buggy submission (verdict: Runtime Error):
S = input()
Ans = 0
box = []

for i in range(2 ** (len(S)-1)):  # 文字の間に挿入するので、len(S)-1
    for j in range((len(S)-1)):
        box.append(S[j])
        
        if (i >> j) & 1:
            Ans += int("".join(box))
            box.clear()
            
    box.append(S[-1])
    Ans += int("".join(box))
    box.clear()

print(Ans)
Problem p02694 (python)

Fixed submission:
import math

X = int(input())
year = 0
yokin = 100

while yokin < X:
    year += 1
    yokin += math.floor(yokin * 0.01)
print(year)

Buggy submission (verdict: Runtime Error):
X = int(input())
default = 100
rishi = 

year = 1
while True:
    default = default + 1
    if default == X:
        print(year)
        break
    year += 1
Problem p02687 (python)

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

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
h=list(map(int,input().split()))
ans=[1]*n
for _ in range(m):
  a,b=map(int,input().split())
  if ans[a-1]:
    if h[a-1]<=h[b-1]:
      ans[a-1]=0
  if ans[b-1]:
    if h[b-1]<=h[a-1]:
      ans[b-1]=0
print(ans.count(1))
Problem p02719 (python)

Fixed submission:
import sys
n,k = map(int,input().split())
if n%k < abs((n%k) - k):
    print(n%k)
    sys.exit()
print(abs((n%k) - k))

Buggy submission (verdict: Runtime Error):
import sys
n,k = map(int,input().split())
if n%k < abs((n%k) - k):
    print(n%k)
    sys.exit(n%k)
print(abs((n%k) - k))
Problem p02765 (python)

Fixed submission:
n,r = map(int,input().split())
if n >= 10:
    print(r)
else:
    print(r + (100 * (10 - n)))

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
def Base_10_to_n(X, A):
    if (int(X/A)):
        return Base_10_to_n(int(X/A), A)+str(X%A)
    return str(X%A)
ans = Base_10_to_n(n,k)
print(len(ans))
Problem p02812 (python)

Fixed submission:
n = input()
s = input()
print(s.count("ABC"))

Buggy submission (verdict: Runtime Error):
n = int(input())
s = input()
ans = 0
for i in range(n):
    if s[i] == "A":
        if s[i+1] == "B":
            if s[i+2] == "C":
                ans += 1
print(ans)
Problem p02922 (python)

Fixed submission:
# B - Power Socket
def main():
    a, b = map(int, input().split())
    cnt = 1
    ans = 0
    for i in range(20):
        if cnt >= b:
            print(ans)
            exit()
        else:
            cnt = a + (a-1) * i
            ans += 1

if __name__ ==  "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import math
a,b = map(input().split())
print(math.ceil(b%a))
Problem p02923 (python)

Fixed submission:
# C - Lower
def main():
    n = int(input())
    h = list(map(int, input().split()))
    cnt = 0
    ans = []

    if n == 1:
        print(0)
        exit()
    for i in range(n-1):
        if h[i] >= h[i+1]:
            cnt += 1
            if i == n-2:
                ans.append(cnt)

        else:
            ans.append(cnt)
            cnt = 0
    print(max(ans))


if __name__ ==  "__main__":
    main()

Buggy submission (verdict: Runtime Error):
# C - Lower
def main():
    n = int(input())
    h = list(map(int, input().split()))
    cnt = 0
    ans = []

    for i in range(n-1):
        if h[i] >= h[i+1]:
            cnt += 1
            if i == n-2:
                ans.append(cnt)

        else:
            ans.append(cnt)
            cnt = 0
    print(max(ans))


if __name__ ==  "__main__":
    main()
Problem p02780 (python)

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

import numpy as np

Q = np.cumsum(P)

R = np.pad(Q,K,'constant', constant_values=0)[:N]

a = np.argmax(Q-R)

ans = 0
for i in range(K):
    ans += (1.00+P[a-i])/2.00
print(ans)

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

import numpy as np

Q = np.argmax([sum(P[i:i+K]) for i in range(N-K)])

Q = [sum(P[:K])]
for i in range(1,N-K+1):
    Q.append(Q[i-1]+P[K+i-1]-P[i-1])
a = np.argmax(Q)

ans = sum([(1.00+P[a+j])/2.00 for j in range(K)])

print(ans)
Problem p02813 (python)

Fixed submission:
import math

N = int(input())

P = list(map(int,input().split()))
Q = list(map(int,input().split()))

def check(A):
    L = [j+1 for j in range(N)]
    ans = 0
    for i in range(N):
        a = L.index(A[i])
        ans += a*math.factorial(N-1-i)
        L.pop(a)
    return ans
p = check(P)
q = check(Q)
print(abs(p-q))

Buggy submission (verdict: Runtime Error):
import math

N = int(input())

P = list(map(int,input().split()))
Q = list(map(int,input().split()))

def check(A):
    L = [j+1 for j in range(N)]
    ans = 0
    for i in range(N):
        a = L.index(A[i])
        ans += a*math.factorial(N-1-i)
        L.pop(a)
    return ans
p = check(P)
q = check(Q)
print(abs(P-Q))

Buggy submission (verdict: Runtime Error):
import math

N = int(input())

P = list(map(int,input().split()))
Q = list(map(int,input().split()))

def check(A):
    L = [j+1 for j in range(N)]
    ans = 0
    for i in range(N):
        a = L.index(A[i])
        ans += a*math.factorial(N-1-i)
        L.pop(a)
    return ans
p = check(P)
q = check(Q)
print(math.abs(P-Q))
Problem p02886 (python)

Fixed submission:
N = int(input())

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

S = sum(d)

ans = 0

for i in range(N):
    ans += (S-d[i])*d[i]
print(int(ans/2))

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

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

S = sum(d)

ans = 0

for i in range(N):
    ans += (S-d[i])*d[i]
print(ans(
Problem p02898 (python)

Fixed submission:
N,K = list(map(int,input().split()))
A = list(map(int,input().split()))
print(sum([1 if K<=a else 0 for a in A]))

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

print(sum([1 if K<=a else 0 for a in A])
Problem p02911 (python)

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

point = [K-Q for _ in range(N)]

for i in range(Q):
    p = int(input())-1
    point[p] += 1
for i in range(N):
    if point[i] <= 0:
        print('No')
    else:
        print('Yes')

Buggy submission (verdict: Runtime Error):
N,K,Q = list(map(int,input().split()))
A = []

point = [[K-Q] for _ in range(N)]

for i in range(Q):
    p = int(input())-1
    point[p] += 1
for i in range(N):
    if point[i] <= 0:
        print('No')
    else:
        print('Yes')
Problem p02921 (python)

Fixed submission:
S = input()
T = input()
print(sum([1 if S[i]==T[i] else 0 for i in range(3)]))

Buggy submission (verdict: Runtime Error):
S = input()
T = input()
print(sum([1 if S[i]==T[i] else 0 for i in range(3)))
Problem p02945 (python)

Fixed submission:
import numpy as np
li = list(map(int,input().split()))
A = li[0]
B = li[1]
print(np.max([A+B,A-B,A*B]))

Buggy submission (verdict: Runtime Error):
import numpy as np
li = list(map(int,input().split()))
A = li[0]
B = li[1]
print(np.max(A+B,A-B,A*B))
Problem p02952 (python)

Fixed submission:
N = int(input())
keta = len(str(N))
cnt = 0

for i in range(keta):
    if i % 2 == 1:
        cnt += 10**(i) - 10**(i-1)

if keta % 2 == 1:
    cnt += N - 10**(keta-1) + 1

print(cnt)

Buggy submission (verdict: Runtime Error):
N = int(input())
keta = len(N)
cnt = 0

for i in range(keta):
    if i % 2 == 1:
        cnt += 10**(i) - 10**(i-1)

if keta % 2 == 1:
    cnt += N - 10**(keta-1) + 1

print(cnt)
Problem p02957 (python)

Fixed submission:
x,y = map(int,input().split())
if (x+y) % 2 != 0:
    print('IMPOSSIBLE')
else:
	print(int((x+y) / 2))

Buggy submission (verdict: Runtime Error):
import numpy as np
s = list(input())
if np.sum(s) % 2 != 0:
    print('IMPOSSIBLE')
print(np.sum(s) % 2)
Problem p02958 (python)

Fixed submission:
n = input()
li = list(map(int,input().split()))
false = 0
for i in range(int(n)):
    if (i+1) != li[i]:
        false += 1
if false == 0 or false == 2:
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
n = input()
li = list(map(int,input().split()))
false = 0
for i in range(n):
    if i != li[i]:
        false += 1
if false == 0 or false == 2:
    print('YES')
else:
    print('N0')

Buggy submission (verdict: Runtime Error):
n = input()
li = list(map(int,input().split()))
false = 0
for i in range(n):
    if i != li[i]:
        false += 1
if false == 0 or false == 2:
    print('YES')
else:
    print('N0')
Problem p02981 (python)

Fixed submission:
li = list(map(int,input().split()))
 
if li[0]*li[1] > li[2]:
    print(li[2])
else:
    print(li[0]*li[1])

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

if int(s[0])* int(s[1]) > int(s[2]):
    print(s[2])
else:
    print(int(s[0])* int(s[1]))
Problem p02985 (python)

Fixed submission:
import sys
sys.setrecursionlimit(100000)
 

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

tree = [[] for _ in range(N+10)]

for i in range(N-1):
    a,b = list(map(int,input().split()))
    tree[a-1].append(b-1)
    tree[b-1].append(a-1)

ans = []
def wfs(now,back):
    if now != 0:
        cnt = K - 2 #まず一個上のを引く。
    else:
        cnt = K - 1
    for nxt in tree[now]:
        if nxt != back:
            ans.append(cnt)
            cnt = cnt - 1
            wfs(nxt,now)

ans.append(K)
wfs(0,-1)

ans2 = 1
for j in range(len(ans)):
    ans2 = (ans2 * ans[j]) % (10**9+7)
print(ans2)

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

tree = [[] for _ in range(N+10)]

for i in range(N-1):
    a,b = list(map(int,input().split()))
    tree[a-1].append(b-1)
    tree[b-1].append(a-1)

ans = []
def wfs(now,back):
    if now != 0:
        cnt = K - 2 #まず一個上のを引く。
    else:
        cnt = K - 1
    for nxt in tree[now]:
        if nxt != back:
            ans.append(cnt)
            cnt = cnt - 1
            wfs(nxt,now)

ans.append(K)
wfs(0,-1)

ans2 = 1
for j in range(len(ans)):
    ans2 = (ans2 * ans[j]) % (10**9+7)
print(ans2)

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

tree = [[] for _ in range(N+10)]

for i in range(N-1):
    a,b = list(map(int,input().split()))
    tree[a-1].append(b-1)
    tree[b-1].append(a-1)

ans = []
def wfs(now,back):
    if now != 0:
        cnt = K - 2 #まず一個上のを引く。
    else:
        cnt = K - 1
    for nxt in tree[now]:
        if nxt != back:
            ans.append(cnt)
            cnt = cnt - 1
            wfs(nxt,now)

ans.append(K)
wfs(0,-1)

ans2 = 1
for j in range(N):
    ans2 = (ans2 * ans[j]) % (10**9+7)
print(ans2)

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

tree = [[] for _ in range(N)]

for i in range(N-1):
    a,b = list(map(int,input().split()))
    tree[a-1].append(b-1)
    tree[b-1].append(a-1)

ans = []
def wfs(now,back):
    if now != 0:
        cnt = K - 2 #まず一個上のを引く。
    else:
        cnt = K - 1
    for nxt in tree[now]:
        if nxt != back:
            ans.append(cnt)
            cnt = cnt - 1
            wfs(nxt,now)

ans.append(K)
wfs(0,-1)

ans2 = 1
for j in range(N):
    ans2 = (ans2 * ans[j]) % (10**9+7)
print(ans2)
Problem p03565 (python)

Fixed submission:
S = input()
T = input()

N = len(S)
M = len(T)

i_a = 0
for i in reversed(range(N-M+1)):
    ans = 0
    for j in range(M+1):
        if j == M:
            print((S[:i]+T+S[i+M:]).replace('?','a'))
            exit()
        if T[j] == S[i+j] or S[i+j] == '?':
            continue
        else:
            break

print('UNRESTORABLE')

Buggy submission (verdict: Runtime Error):
S = input()
T = input()

N = len(S)
M = len(T)

i_a = 0
for i in reversed(range(N-M+1)):
    ans = 0
    for j in range(M):
        if T[j] == S[i+j] or S[i+j] == '?':
            ans += 1
        else:
            break
    if ans == M:
        for k in range(N):
            if k == i:
                print(T,end='')
            elif k < i or i + M - 1 < k:
                if S[k] == '?':
                    print('a',end='')
                else:
                    print(S[k],end='')
        exit()
    if i == 0:
        print('UNRESTORABLE')
        eixt()

Buggy submission (verdict: Runtime Error):
S = input()
T = input()

N = len(S)
M = len(T)

i_a = 0
for i in reversed(range(N-M+1)):
    ans = 0
    for j in range(M):
        if T[j] == S[i+j] or S[i+j] == '?':
            ans += 1
        else:
            break
    if ans == M:
        for k in range(N):
            if k == i:
                print(T,end='')
            elif k < i or i + M - 1 < k:
                if S[k] == '?':
                    print('a',end='')
                else:
                    print(S[k],end='')
            exit()
    if i == 0:
        print('UNRESTORABLE')
        eixt()

Buggy submission (verdict: Runtime Error):
S = input()
T = input()

N = len(S)
M = len(T)

i_a = 0
for i in reversed(range(N-M+1)):
    ans = 0
    for j in range(M):
        if T[j] == S[i+j] or S[i+j] == '?':
            ans += 1
        else:
            break
    if ans == M:
        for k in range(N):
            if k == i:
                print(T,end='')
            elif k < i or i + M - 1 < k:
                if S[k] == '?':
                    print('a',end='')
                else:
                    print(S[k],end='')
        break
    if i == 0:
        print('UNRESTORABLE'
Problem p04001 (python)

Fixed submission:
s = list(input())

def sum_list(S,stock):
    if len(S) == 2:
        return int(S[0]) + int(S[1]) + int(S[0]+S[1]) + stock * 2
    elif len(S) == 1:
        return int(S[0])
    else:
        return sum_list(S[1:],int(S[0])+stock) + sum_list([S[0]+S[1]]+S[2:],stock)
                                                 
print(sum_list(s,0))

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

def sum_list(S,stock):
    if len(S) == 2:
        return int(S[0]) + int(S[1]) + int(S[0]+S[1]) + stock * 2
    else:
        return sum_list(S[1:],int(S[0])+stock) + sum_list([S[0]+S[1]]+S[2:],stock)
                                                 
print(sum_list(s,0))
Problem p02583 (python)

Fixed submission:
import itertools
import math
n=int(input())
l=list(map(int,input().split()))
if len(l)<=2:
    print('0')
else:
    c = list(itertools.combinations(l, 3))
    count=0
    r=math.factorial(len(l)) // (math.factorial(len(l) - 3) * 6)
    for i in range(r):
        if c[i][0]==c[i][1] or c[i][1]==c[i][2] or c[i][2]==c[i][0]:
            pass
        else:
            if c[i][0]+c[i][1]>c[i][2] and c[i][1]+c[i][2]>c[i][0] and c[i][2]+c[i][0]>c[i][1]:
                count+=1
            else:
                pass
    print(count)

Buggy submission (verdict: Runtime Error):
import itertools
import math
n=int(input())
l=list(map(int,input().split()))
c = list(itertools.combinations(l, 3))
count=0
r=math.factorial(len(l)) / (math.factorial(len(l) - 3) * 6)
for i in range(r):
    if c[i][0]==c[i][1] or c[i][1]==c[i][2] or c[i][2]==c[i][0]:
        pass
    else:
        if c[i][0]+c[i][1]>c[i][2] and c[i][1]+c[i][2]>c[i][0] and c[i][2]+c[i][0]>c[i][1]:
            count+=1
        else:
            pass
print(count)

Buggy submission (verdict: Runtime Error):
import itertools
import math
n=int(input())
l=list(map(int,input().split()))
c = list(itertools.combinations(l, 3))
count=0
r=math.factorial(len(l)) / (math.factorial(len(l) - 3) * 6)
print(r)
for i in range(r):
    if c[i][0]==c[i][1] or c[i][1]==c[i][2] or c[i][2]==c[i][0]:
        pass
    else:
        if c[i][0]+c[i][1]>c[i][2] and c[i][1]+c[i][2]>c[i][0] and c[i][2]+c[i][0]>c[i][1]:
            count+=1
        else:
            pass
print(count)

Buggy submission (verdict: Runtime Error):
import itertools
import math
n=int(input())
l=list(map(int,input().split()))
c = list(itertools.combinations(l, 3))
count=0
r=math.factorial(len(l)) // (math.factorial(len(l) - 3) * 6)
print(r)
for i in range(r):
    if c[i][0]==c[i][1] or c[i][1]==c[i][2] or c[i][2]==c[i][0]:
        pass
    else:
        if c[i][0]+c[i][1]>c[i][2] and c[i][1]+c[i][2]>c[i][0] and c[i][2]+c[i][0]>c[i][1]:
            count+=1
        else:
            pass
print(count)
Problem p02761 (python)

Fixed submission:
n,m=map(int,input().split())
if m==0:
  if n ==1:
    print(0)
  else:
    print(10**(n-1))
else:
  sc= [list(map(int,input().split())) for i in range(m)]
  ans = -1
  for j in range(10**(n-1)-1,10**n):
    k=str(j)
    s=[[0 for i in range(2)] for i in range(len(k))]
    for l in range(len(k)):
      s[l][0]=l+1
      s[l][1]=int(k[l])
      if all(elm in s for elm in sc) == 1:
        ans=j
        break
    if ans==j:
      break
  print(ans)

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
if m=0:
  print(0)
else:
  sc= [list(map(int,input().split())) for i in range(m)]
  ans = -1
  s=[[0 for i in range(2)] for i in range(n)]
  for j in range(10**n):
    k=str(j)
    for l in range(len(k)):
      s[l][0]=l+1
      s[l][1]=int(k[l])
    if all(elm in s for elm in sc) == 1:
      ans=j
      break
  print(ans)

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
if m=0:
  print(0)
else:
  sc= [list(map(int,input().split())) for i in range(m)]
  ans = -1
  s=[[0 for i in range(2)] for i in range(n)]
  for j in range(10**n):
  k=str(j)
    for l in range(len(k)):
      s[l][0]=l+1
      s[l][1]=int(k[l])
    if all(elm in s for elm in sc) == 1:
      ans=j
      break
  print(ans)
Problem p02705 (python)

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

Buggy submission (verdict: Runtime Error):
R = input()
print (R*3.1415926)
Problem p02841 (python)

Fixed submission:
m1,d1 =map(int,input().split())
m2,d2 =map(int,input().split())
if m1 == m2 :
    print (0)
else :
    print (1)

Buggy submission (verdict: Runtime Error):
m1,d1 =map(int,input().split())
m2,d2 =map(int,input().split())
if m1 == m2 :
    return 0 :
else :
    return 1: