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

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

ab = A + B
cd = C + D

if ab == cd:
    print('Balanced')
elif ab > cd:
    print('Left')
else:
    print('Right')

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

ab = A + B
cd = C + D

if ab == cd:
    print('Balanced')
elif ab > cd:
    print('Left')
else:
    print('Right')
Problem p03624 (python)

Fixed submission:
j = set('abcdefghijklmnopqrstuvwxyz')
s = set(input())
k = sorted(j - s)

if len(k)==0:
    print('None')
else:
    print(k[0])

Buggy submission (verdict: Runtime Error):
j = set('abcdefghijklmnopqrstuvwxyz')
s = set(input())
k = sorted(j - s)

if k != '':
    print(k[0])
else:
    print('None')
Problem p03035 (python)

Fixed submission:
[A,B]=list(map(int,input().split(" ")))
if A>=13:
    print(B)
elif A>=6:
    print(int(B/2))
else:
    print(0)

Buggy submission (verdict: Runtime Error):
[A,B]=list(map(int,input().split(" ")))
if A>=13:
    print(B)
elif A>=6:
    print(B/2)
else
    print(0)
Problem p03049 (python)

Fixed submission:
n = int(input())
s = []
for i in range(n):
    s.append(input())
out = 0
a=0
b=0
c=0
for i in range(len(s)):
    if s[i][0] == "B" and s[i][len(s[i])-1] == "A":
        a=a+1
    elif s[i][0] == "B" and s[i][len(s[i])-1] != "A":
        b=b+1
    elif s[i][0] != "B" and s[i][len(s[i])-1] == "A":
        c=c+1
    for j in range(len(s[i])-1):
        if s[i][j] == "A" and s[i][j+1] == "B":
            out = out+1
if a== 0 and b == 0 and c == 0:
    out = out
elif b == 0 and c == 0:
    out = out + a - 1
else :
    out = out +a+ min(b,c)
    
print(int(out))

Buggy submission (verdict: Runtime Error):
n = int(input())
s = []
for i in range(n):
    s.append(input())
out = 0
a=0
b=0
c=0
for i in range(len(s)):
    if s[i][0] == "B" and s[i][len(s[i])-1] == "A":
        a=a+1
    elif s[i][0] == "B" and s[i][len(s[i])-1] != "A":
        b=b+1
    elif s[i][0] != "B" and s[i][len(s[i])-1] == "A":
        c=c+1
    for j in range(len(s[i])-1):
        if s[i][j] == "A" and s[i][j+1] == "B":
            out = out+1
if a== 0 and b == 0 and c == 0:
elif b == 0 and c == 0:
    out = out + a - 1
else :
    out = out +a+ min(b,c)
    
print(int(out))
Problem p03231 (python)

Fixed submission:
[n,m] = list(map(int, input().split(" ")))
s = input()
t = input()
def gcd(a,b):
    if b == 0:
        return a
    else:
        return gcd(b,a%b)
g = gcd(n,m)
out = n*m/g
for i in range (0,g):
    if s[i*int(n/g)] != t[i*int(m/g)]:
        out = -1
        break
print(int(out))

Buggy submission (verdict: Runtime Error):
import math
[n,m] = list(map(int, input().split(" ")))
s = input()
t = input()
g = math.gcd(n,m)
out = n*m/g
for i in range (0,g):
    if s[i*int(n/g)] != t[i*int(m/g)]:
        out = -1
        break
print(int(out))
Problem p02787 (python)

Fixed submission:
#int でsplitを使う場合はmap関数を利用しなければならない
H,N = map(int,input().split())
li=[]
x=[]
for i in range(N):
    A,B = map(int,input().split())
    x.append(A)
    li.append([A,B])
dp = [10**9]*(H+max(x))
dp[0] = 0
for i in range(1,len(dp)):
    dp[i] = min(dp[i-a] + b for a,b in li)
print(min(dp[H:]))

Buggy submission (verdict: Runtime Error):
#int でsplitを使う場合はmap関数を利用しなければならない
H,N = map(int,input().split())
li=[]
x=[]
for i in range(N):
    A,B = map(int,input().split())
    x.append(A)
    li.append([A,B])
dp = [10**9]*(H+max(x))
dp[0] = 0
for i in range(1,len(dp)):
    dp[i] = min(dp[i-a] + b for a,b in li)
print(min(dp[h:]))
Problem p02791 (python)

Fixed submission:
N = int(input())
P = [int(x) for x in input().split()]
count = 0
check = 0
min = 10**9
for i in P:
    check = 0
    if min > i:
        min = i
    if i <= min:
        count += 1

print(count)

Buggy submission (verdict: Runtime Error):
N = int(input())
P = [int(x) for x in input().split()]
count = 0
check = 0
for i in range(N):
    check = 0
    for j in range(i):
        if P[i] > P[j]:
            check = 1
            break
    if check == 0:
    count += 1

print(count)
Problem p02802 (python)

Fixed submission:
import numpy as np

N,M = map(int,input().split())

AC = np.array([0]*N)
WA = np.array([0]*N)

for i in range(M):
    p,S = input().split()

    if AC[int(p)-1] ==0 and S == "WA":
       WA[int(p)-1] += 1
    else:
        AC[int(p)-1] = 1

print(sum(AC),sum(AC*WA))

Buggy submission (verdict: Runtime Error):
import numpy as np
n,p = map(int,input().split())
ac = np.array([0]*n)
wa = np.array([0]*n)

for i in range(N):
    p,s = input().split()
    if ac[int(p) - 1] == 0 and s == "WA":
        wa[int(p) - 1] += 1
    else:
        ac[int(p) - 1] = 1

if sum(ac) == 0:
    print(0,0)
else:
    print(sum(ac),sum(wa))

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
p = [0]*m
s = [0]*m
c = [0]*m
j = 1
for i in range(m):
    p[i],s[i] = map(str,input().split())
    if i == 0:
        c[i] = str(p[i])
    elif c[j - 1] != p[i]:
        c[j] = str(p[i])
        j += 1
ac = 0
wa = 0
j = 0
for i in range(m):

    if p[i] == c[j] and s[i] == "AC":
        ac += 1
        j += 1
        if c[j] == 0:
            break
    else :
        wa += 1
        
print("{} {}".format(ac,wa))
Problem p03356 (python)

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

par = {x:x for x in range(1, n+1)}

def root(node):
    if par[node] == node:
        return node
    par[node] = root(par[node])
    return par[node]

for _ in range(m):
    x, y  = map(int, input().split())
    par[root(x)] = root(y)
    
ans = 0
for i in range(1, n+1):
    if root(i) == root(p[i-1]):
        ans += 1

print(ans)

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

par = {x:x for x in range(1, n+1)}

def root(node):
    if par[node] == node:
        return node
    par[node] = root(par[node])
    return par[node]

for _ in range(m):
    x, y  = map(int, input().split())
    par[root[x]] = root[y]
    
ans = 0
for i in range(1, n+1):
    if root[i] == root(p[i-1]):
        ans += 1

print(ans)

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

par = {x:x for x in range(1, n+1)}

def root(node):
    if par[node] == node:
        return node
    par[node] = root(par[node])
    return par[node]

for _ in range(m):
    x, y  = map(int, input().split())
    par[root[x]] = root[y]
    
ans = 0
for i in range(1, n+1):
    if root[i] == root(p[i]):
        ans += 1

print(ans)
Problem p02687 (python)

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

Buggy submission (verdict: Runtime Error):
S == input()
if S = "ABC":
  print("ARC")
else:
  print("ABC")

Buggy submission (verdict: Runtime Error):
S = input()
if S = "ABC":
  print("ARC")
else:
  print("ABC")
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,R = map(int,input().split())
if N >= 10:
  print(R)
else:
  print(100*(10-K))
Problem p02783 (python)

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

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

Fixed submission:
l = int(input())
p = l/3
p = p**3
print(p)

Buggy submission (verdict: Runtime Error):
l = int(input())
x = l/3
x = p**3
print(x)
Problem p02705 (python)

Fixed submission:
import numpy as np
r = int(input())

print(2 * r * np.pi)

Buggy submission (verdict: Runtime Error):
import numpy as np
r = int(input())

return  2 * r * np.pi
Problem p02946 (python)

Fixed submission:
K, X = map(int, input().split())

lower = X - K + 1
upper = X + K - 1
ans = [i for i in range(lower, upper+1)]
ans_str = " ".join(list(map(str, ans)))
print(ans_str)

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

l = K // 2
lower = X - l
upper = X + l
ans = [i for i in range(lower, upper+1)]
ans_str = " ".join(ans)
print(ans_str)
Problem p02947 (python)

Fixed submission:
from collections import Counter
N = int(input())
s = []
cnt = 0
for _ in range(N):
  a = str(input())
  alist = sorted(list(a))
  s.append(str(''.join(alist)))
  
l = Counter(s)
for i in l.values():
  if i > 1:
    cnt += (i - 1) * i / 2
print(int(cnt))

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

for _ in range(N):
  s.append(str(input()))
  
cnt = 0
for i in range(N):
  delete = []
  s1 = s.pop()
  s1list = list(s1)
  same = 0
  
  for j in range(len(s)-1, -1, -1):
    s2 = s[j]
    s2list = list(s2) 
    if sorted(s1list) == sorted(s2list):
      delete.append(s2)
      same += 1
  cnt += math.factorical(same)
  for x in delete:
    s.remove(x)
  if not s:
    break
print(cnt)
Problem p02982 (python)

Fixed submission:
import math
N, D = map(int, input().split())
X = []

for i in range(N):
  buf = list(map(int, input().split()))
  X.append(buf)

cnt = 0

for i in range(N-1):
  for j in range(i+1,N):
    dist2 = 0
    for index in range(D):
      dist2 += (X[i][index] - X[j][index]) ** 2
    dist = math.sqrt(dist2)
    if dist == float(int(dist)):
      cnt += 1

print(cnt)

Buggy submission (verdict: Runtime Error):
import math
N, D = map(int, input().split())
X = []

for i in range(N):
  inp = input()
  buf = list(map(int, inp))
  X.append(buf)

cnt = 0

for i in range(N-1):
  for j in range(i+1,N):
    dist2 = 0
    for index in range(D):
      dist2 += (X[i][index] - X[j][index]) ** 2
    dist = math.sqrt(dist2)
    if dist == float(int(dist)):
      cnt += 1

print(cnt)
Problem p03161 (python)

Fixed submission:
import sys
import numpy as np

# inputを高速化する。
input = sys.stdin.readline

n, k = map(int, input().split())
h = [int(i) for i in input().split()]

# dpの配列を作る。
dp = np.zeros(n, dtype=int)
# hの配列を作る。
h = np.array(h)


for i in range(1, n):
    # start は負になることはない。
    start = max(0, i-k)
    # 行列として足し算できるのでforを使う必要がない。
    dp[i] = min(dp[start: i] + np.abs(h[i] - h[start: i]))

print(dp[n-1])

Buggy submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(200000)
import numpy as np
N, K = map(int, input().split())
h = list(map(int, input().split()))
d = np.inf
dp = [d] * N

def rec(i):
  if dp[i] != d:
    return dp[i]
  elif i == 0:
    return 0
  min1 = min([np.abs(h[i] - h[i-j])+rec(i-j) for j in range(1, min(i, K)+1)])
  dp[i] = min1
  return min1
print(rec(N-1))
Problem p03163 (python)

Fixed submission:
import sys
import numpy as np
input = sys.stdin.readline
N, W = map(int, input().split())
def knapsack():
  dp = np.zeros((N+1, W+1), dtype=int)
  c = np.arange(1, N+1)
  for i in c:
    w, v = map(int, input().split())
    dp[i][w:] = np.maximum(dp[i-1][w:], dp[i-1][:-w] + v)
    dp[i][:] = np.maximum(dp[i][:], dp[i-1][:])
  return dp[-1][-1]
print(knapsack())

Buggy submission (verdict: Runtime Error):
import sys
import numpy as np
input = sys.stdin.readline
N, W = map(int, input().split())
def knapsack():
  dp = np.zeros((N+1, W+1), dtype=int)
  c = np.arange(1, N+1)
  cc = np.arange(1, W+1)
  for i in c:
    w, v = map(int, input().split())
    dp[i][w:] = max(dp[i-1][w:], dp[i-1][:-w] + v)
    dp[i][:] = max(dp[i][:], dp[i-1][:])
  return dp[-1][-1]
print(knapsack())

Buggy submission (verdict: Runtime Error):
import sys
import numpy as np
input = sys.stdin.readline
N, W = map(int, input().split())
def knapsack(w, v):
  dp = np.zeros((N+1, W+1), dtype=int)
  for i in range(1, N+1):
    w, v = map(int, input().split())
    for sum_w in range(1, W+1):
      if sum_w - w >= 0:
        dp[i][sum_w] = max(dp[i-1][sum_w], dp[i-1][sum_w-w] + v)
      dp[i][sum_w] = max(dp[i][sum_w], dp[i-1][sum_w])
  return dp[-1][-1]
print(knapsack(w, v))
Problem p02687 (python)

Fixed submission:
s = input()
if(s[1] == "R"):
  print("ABC")
else:
  print("ARC")

Buggy submission (verdict: Runtime Error):
s = input()
if(s[1] == "R"):
  print("ABC")
 else:
  print("ARC")
Problem p02705 (python)

Fixed submission:
import math
r = int(input())
print(2*math.pi*r)

Buggy submission (verdict: Runtime Error):
import math
r = int(input())
print(2*math.PI*r)
Problem p02791 (python)

Fixed submission:
n = int(input())
li = list(map(int, input().split()))
tmpMin = li[0]
count = 0

for i in range(n):
    if li[i] <= tmpMin:
        tmpMin = li[i]
        count += 1

print(count)

Buggy submission (verdict: Runtime Error):
n = int(input())
li = list(map(int, input().split()))
tmpMinIndex = li.index(1)
count = 0

while True:
    count += 1
    tmpMinIndex = li[0:tmpMinIndex]
    if tmpMinIndex == 0:
        break

print(count)
Problem p02801 (python)

Fixed submission:
x = str(input())
alph = 'abcdefghijklmnopqrstuvwxyz'
a = alph.find(x) + 1
b = alph[a]
print(b)

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
li = []
seitou = 0
penalty = 0

if m == 0:
    print(0, 0)

else:
    for x in range(m):
        i, j = map(str, input().split())
        if i in li:
            pass
        else:
            if j == "WA":
                penalty += 1
            if j == "AC":
                li.append(i)
                seitou += 1

    print(seitou, penalty)

Buggy submission (verdict: Runtime Error):
n, k, m = map(int, input().split())
li = list(map(int, input().split()))
genzai = sum(li)
mokuhyou = n*m
theta = mokuhyou-genzai
if theta > k:
    print(-1)
elif k >= theta:
    print(theta)
elif theta < 0:
    print(0)
Problem p02802 (python)

Fixed submission:
n, m = input().split()
a = [False] * int(n)
b = [0] * int(n)
AC = 0
WA = 0
for i in range(int(m)):
    p, s = input().split()
    if(s == "AC" and a[int(p) - 1] == False):
        a[int(p) - 1] = True
        AC += 1
        WA += b[int(p) - 1]

    if(s == "WA" and a[int(p) - 1] == False):
        b[int(p)-1] += 1

print(AC, WA)

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
li = []
seitou = 0
penalty = 0

if m == 0:
    print(0, 0)
else:
    for x in range(5):
        i, j = map(str, input().split())
        if i in li:
            pass
        else:
            if j == "WA":
                penalty += 1
            if j == "AC":
                li.append(i)
                seitou += 1

    print(seitou, penalty)
Problem p02789 (python)

Fixed submission:
a, b=map(int, input().split())
if a==b:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a, b=map(int(), input().split())
if a==b:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a,b=map(int(), input().split())
if a==b:
  print("Yes")
else:
  print("No")
Problem p03693 (python)

Fixed submission:
r,g,b = input().split()
if int(r+g+b) % 4 ==0:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
r,g,b = input()
if (r*100 + g*10+b) % 4 ==0:
  print("YES")
else:
  print("NO")
Problem p02909 (python)

Fixed submission:
S = input()

wet = ["Sunny","Cloudy","Rainy"]

if S == wet[0]:
        nexS = wet[1]
elif S == wet[1]:
        nexS = wet[2]
else:
        nexS = wet[0]
print(nexS)

Buggy submission (verdict: Runtime Error):
wet = ["Sunny","Cloudy","Rainy"]

if S == wet[0]:
	ptint(wet[1])
elif S == wet[1]:
	ptint(wet[2])
else:
	ptint(wet[0])
Problem p03037 (python)

Fixed submission:
n, m = map(int, input().split())
a, b = 0, n;
for i in range(m):
	l, r = map(int, input().split())
	a, b = max(a, l), min(b, r)

print(b-a+1 if a <= b else 0)

Buggy submission (verdict: Runtime Error):
#include <iostream>
using namespace std;

int main()
{
	int n, m;
	cin >> n >> m;
	int a = 0;
	int b = n;
	for (int i = 0; i < m; i++){
		int l, r;
		cin >> l >> r;
		a = max(a, l);
		b = min(b, r);
	}

	cout << (a <= b ? b-a+1 : 0) << endl;
}
Problem p03085 (python)

Fixed submission:
b = input()
X = {'A', 'T'}
Y = {'G', 'C'}
print(''.join(X - {b}) if b in X else ''.join(Y - {b}))

Buggy submission (verdict: Runtime Error):
b = input()
X = ['A', 'T']
Y = ['G', 'C']
print(str(X - b) if b in X else str(Y - b))
Problem p03455 (python)

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

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split)
if (a*b)%2 = 0:
	print('Even')
Else:
    print('Odd')
Problem p03493 (python)

Fixed submission:
a = str(input())
count = 0
for i in range(3):
  if int(a[i]) == 1:
    count = count + 1
print(count)

Buggy submission (verdict: Runtime Error):
a[]=input()
count = 0
fot i in range(3)
	if a[i] = 1:
  		count = count + 1
print(count)
Problem p03175 (python)

Fixed submission:
# cook your dish here
import sys
 
sys.setrecursionlimit(100005)
MOD = 1000000007
 
 
def dfs(v, a):
    w, b = 1, 1
    # print(w,b,v);
    for u in links[v]:
        if u == a:
            continue
        cw, cb = dfs(u, v)
        w *= cw + cb
        b *= cw
        w %= MOD
        b %= MOD
        # print(w,b,u,cw,cb);
    return w, b
 
 
n = int(input())
links = [set() for _ in range(n)]
for line in sys.stdin.readlines():
    x, y = map(int, line.split())
    x -= 1
    y -= 1
    links[x].add(y)
    links[y].add(x)
 
print(sum(dfs(0, None)) % MOD)

Buggy submission (verdict: Runtime Error):
// Author - Sumit 

#include <bits/stdc++.h>
using namespace std;

const int mod = 1e9+7;

using ll = long long;

const int N=1e5+5;
vector<int> v[N];

pair<int,int> dfs(int a,int p){
	int w=1,b=1;
	for(int i:v[a]){
		if(i != p){
			pair<int,int> p = dfs(i,a);
			w *= p.first + p.second;
			b *= p.first;
			w %= mod;
			b %=mod;
		}
	}
	return make_pair(w,b);
} 

int main(){
	int n;
	scanf("%d",&n);
	for(int i=0;i<n-1;++i){
		int x,y;
		scanf("%d%d",&x,&y);
		v[x].push_back(y);
		v[y].push_back(x);
	}
	pair<int,int> p = dfs(1,-1);
	int ans = (p.first + p.second)%mod;
	printf("%d",ans);
    return 0;
}
Problem p02848 (python)

Fixed submission:
n = int(input())-65
s = input()
ans = ''
for x in s:
    ans += chr((ord(x)+n)%26 + 65)
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())-65
s = input()
ans = ''
for x in s:
    ans += chr((ord(x)+n)%26 + 65)
print(ans
Problem p03239 (python)

Fixed submission:
N,T=map(int,input().split())
root=[tuple(map(int,input().split())) for i in range(N)]

minc=1001
for cand in root:
    if cand[1]<=T:
        if cand[0]<minc:
            minc=cand[0]
if minc==1001:
    print("TLE")
else:
    print(minc)

Buggy submission (verdict: Runtime Error):
    N,T=map(int,input().split())
    root=[tuple(map(int,input().split())) for i in range(N)]
     
    minc=1000
    for cand in root:
        if cand[1]<=T:
            if cand[0]<minc:
                minc=cand[0]
    if minc==1000:
        print("TLE")
    else:
        print(minc)

Buggy submission (verdict: Runtime Error):
    N,T=map(int,input().split())
    root=[tuple(map(int,input().split())) for i in range(N)]
     
    minc=1000
    for cand in root(N):
        if cand[1]<=T:
            if cand[0]<minc:
                minc=cand[0]
    if minc==1000:
        print("TLE")
    else:
        print(minc)

Buggy submission (verdict: Runtime Error):
N,T=map(int,input().split())
root=[tuple(map(int,input().split())) for i in range(N)]

minc=1000
for cand in range(N):
    if cand[1]<=T:
        if cand[0]<minc:
            minc=cand[0]
if minc==1000:
    print("TLE")
else:
    print(minc)
Problem p03251 (python)

Fixed submission:
iptA=list(map(int,input().split()))
X=list(map(int,input().split()))
Y=list(map(int,input().split()))
X.append(iptA[2])
Y.append(iptA[3])
     
xmax,ymin=max(X),min(Y)
if xmax>=ymin:
    print('War')
else:
    print('No War')

Buggy submission (verdict: Runtime Error):
iptA=list(map(int,input().split()))
X=list(map(int,input().split())).append(iptA[2])
Y=list(map(int,input().split())).append(iptA[3])
     
xmax,ymax=max(X),max(Y)
if xmax>=ymax:
    print('War')
else:
    print('No War')

Buggy submission (verdict: Runtime Error):
iptA=list(map(int,input().split()))
X=list(map(int,input().split())).append(iptA[2])
Y=list(map(int,input().split())).append(iptA[3])
  
xmax,ymax=max(X),max(Y)
if xmax>=ymax:
    print('War')
 else:
     print('No War')
Problem p03262 (python)

Fixed submission:
import numpy as np
from functools import reduce

def euclid(m,n):
    while n:
        m,n=n,m%n
    return m

N,X=map(int,input().split(" "))
x=np.array(list(map(int, input().split(' '))))
y=abs(x-X)
print(reduce(euclid,y))

Buggy submission (verdict: Runtime Error):
import math
import numpy as np
from functools import reduce
N,X=map(int,input().split(" "))
x=np.array(list(map(int, input().split(' '))))
y=abs(x-X)
print(reduce(math.gcd,y))

Buggy submission (verdict: Runtime Error):
import math
N,X=map(int,input().split(" "))
x=np.array(list(map(int,input().split(' '))))
y=abs(x-X)
print(reduce(math.gcd,y))
Problem p02687 (python)

Fixed submission:
inputStr = input()

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

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

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

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

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

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

if inputStr == 'ABC':
  return 'ARC'
else if inputStr == 'ARC':
  return 'ABC'
else:
  return null

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

if input = 'ABC':
  return 'ARC'
else:
  return 'ABC'
Problem p02705 (python)

Fixed submission:
import numpy as np
R = np.double(input())
print(2*R*np.pi)

Buggy submission (verdict: Runtime Error):
import numpy as np
R = input()
print(2*R*np.pi)

Buggy submission (verdict: Runtime Error):
import numpy as np
input = sys.stdin.readline
R = int(input())
pi = np.pi

print(2*R*pi)
Problem p02993 (python)

Fixed submission:
import sys
from io import StringIO
import unittest
def resolve():
    S = input()
    a = 0
    for i in range(len(S) - 1):
        if (S[i] == S[i + 1]):
            a = 1
    if (a == 0):
        print("Good")
    else:
        print("Bad")
resolve()

Buggy submission (verdict: Runtime Error):
import sys
from io import StringIO
import unittest
def resolve():
    S = input()
    a = 0
    for i in range(len(S) - 1):
        if (S[i] == S[i + 1]):
            a = 1
    if (a == 0):
        print("Good")
    else:
        print("Bad")
resoluve()

Buggy submission (verdict: Runtime Error):
def resolve():
    S = input()
    a = 0
    for i in range(len(S) - 1):
        if (S[i] == S[i + 1]):
            a = 1
    if (a == 0):
        print("Good")
    else:
        print("Bad")
resoluve()
Problem p02994 (python)

Fixed submission:
import sys
from io import StringIO
import unittest
import numpy as np


def resolve():
    N, L = map(int, input().split())
    taste = np.zeros(N)
    for i in range(N):
        taste[i] = L + i
    min_idx = np.argsort(np.abs(taste))[0]
    sum_taste = np.sum(taste) - taste[min_idx]
    print(np.int(sum_taste))

resolve()

Buggy submission (verdict: Runtime Error):
import sys
from io import StringIO
import unittest
import numpy as np


def resolve():
    N, L = map(int, input().split())
    taste = np.zeros(N)
    for i in range(N):
        taste[i] = L + i
    min_idx = np.argsort(np.abs(taste))[0]
    sum_taste = np.sum(taste) - taste[min_idx]
    print(np.int(sum_taste))
resolve()