Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
ans = 1
for i in range(1,n+1):
    ans *= i
ans = ans % (10**9+7)
print(ans)

Fixed submission:
import math
n = int(input())
print(math.factorial(n) % (10**9+7))
Buggy python submission (verdict: Runtime Error):
import itertools
n,m=map(int,input().split())
edge=[[]for i in range(m+1)]

for i in range(m):
    a,b=map(int,input().split())
    edge[a].append(b)
    edge[b].append(a)
    
ans=0
for i in itertools.permutations(range(1,n+1)):
    if i[0]!=1:
        continue
    for j in range(n-1):
        if i[j+1] not in edge[i[j]]:
            break
    else:
        ans+=1
print(ans)

Fixed submission:
import itertools
n,m=map(int,input().split())
edge=[[]for i in range(n+1)]

for i in range(m):
    a,b=map(int,input().split())
    edge[a].append(b)
    edge[b].append(a)
    
ans=0
for i in itertools.permutations(range(1,n+1)):
    if i[0]!=1:
        continue
    for j in range(n-1):
        if i[j+1] not in edge[i[j]]:
            break
    else:
        ans+=1
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
a,b,x=map(int,input().split())
ans=0

for i in range(a,b+1):
    if i%x==0:
        ans+=1
print(ans)

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

bb=b//x
aa=(a-1)//x
print(bb-aa)
Buggy python submission (verdict: Runtime Error):
n=int(input())

for i in range(n):
    if i+i**2>=2*n:
        check=i
        break

total=(1+check)*check//2
out=total-n

for i in range(1,check+1):
    if i!=out:
        print(i)


Fixed submission:
n=int(input())


if n==1:
    print(1)
    exit()
    
if n==2:
    print(2)
    exit()
    
for i in range(n):
    if i+i**2>=2*n:
        check=i

        break

total=(1+check)*check//2
out=total-n

for i in range(1,check+1):
    if i!=out:
        print(i)
Buggy python submission (verdict: Runtime Error):
s=input()

ans='No'
for i in range(len(s)):
    if s[i]=='C':
        temp=s[i:]
        break
for i in temp:
    if i=='F':
        ans='Yes'
        break
        
print(ans)

Fixed submission:
s=input()

ans='No'
temp=''
for i in range(len(s)):
    if s[i]=='C':
        temp=s[i:]
        break
for i in temp:
    if i=='F':
        ans='Yes'
        break
        
print(ans)
Buggy python submission (verdict: Runtime Error):
k,t=map(int,input().split())
a=[int(i) for i in input().split()]

a=sorted(a,reverse=True)

while True:
	if a[1]==0:
		ans=max(a[0]-1,0)
		break
	a[0]-=1
	a[1]-=1
	a=sorted(a,reverse=True)
print(ans)

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

a=sorted(a,reverse=True)

if len(a)==1:
	ans=a[0]-1

else:
	while True:
		if a[1]==0:
			ans=max(a[0]-1,0)
			break
		a[0]-=1
		a[1]-=1
		a=sorted(a,reverse=True)
print(ans)
Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())

li=[1]*(n+1)

se=set()
se.add(1)
for  i in range(m):
	x,y=map(int,input().split())
	li[x]-=1
	li[y]+=1
	print(li)
	if x in se:
		se.add(y)
	if li[x]==0:
		se.remove(x)
print(len(se))

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

li=[1]*(n+1)

se=set()
se.add(1)
for  i in range(m):
	x,y=map(int,input().split())
	li[x]-=1
	li[y]+=1
	if x in se:
		se.add(y)
		if li[x]==0:
			se.remove(x)
print(len(se))

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

li=[1]*(n+1)

se=set()
se.add(1)
for  i in range(m):
	x,y=map(int,input().split())
	li[x]-=1
	li[y]+=1
	print(li)
	if x in se:
		se.add(y)
	if li[x]==0:
		se.remove(x)
print(len(se))

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

li=[1]*(n+1)

se=set()
se.add(1)
for  i in range(m):
	x,y=map(int,input().split())
	li[x]-=1
	li[y]+=1
	if x in se:
		se.add(y)
		if li[x]==0:
			se.remove(x)
print(len(se))
Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline

def main():
    x = int(input())
    for i in range(-1000, 1000):
        for j in range(-1000, 1000):
            if x == i**5 - j**5:
                print(i, j)
                break
        else:
            continue
        break

if __name__ == '__main__':
    main()

Fixed submission:
a = input()
if a == 'ABC':
    print('ARC')
else:
    print('ABC')

Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline

def main():
    X = int(input())
    i = 0
    while True:
        a = (X + i**5)**(1/5)
        if isinstance(a, float):
            if a.is_integer():
                print(str(int(a))+' '+str(i))
                break

        a = (X - i**5)**(1/5)
        if isinstance(a, float):
            if a.is_integer():
                print(str(int(a))+' '+str(-i))
                break
        i += 1

if __name__ == '__main__':
    main()

Fixed submission:
a = input()
if a == 'ABC':
    print('ARC')
else:
    print('ABC')

Buggy python submission (verdict: Runtime Error):
a = int(input())
if a == 'ABC':
    print('ARC')
else:
    print('ABC')

Fixed submission:
a = input()
if a == 'ABC':
    print('ARC')
else:
    print('ABC')
Buggy python submission (verdict: Runtime Error):
n, k = int(input())
l_n = [0] * n
for i in range(0, k):
    d = int(input())
    a = int(input())
    for l in a:
        l_n[l-1] = 1
print(l_n.count(0)) 

Fixed submission:
n, k = map(int, input().split())
l_n = [0] * n
for i in range(0, k):
    d = int(input())
    a = map(int, input().split())
    for l in a:
        l_n[l-1] = 1
print(l_n.count(0))
Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline

def main():
    x = int(input())
    for i in range(-1000, 1000):
        for j in range(-1000, 1000):
            if x == i**5 - j**5:
                print(i, j)
                break
        else:
            continue
        break

if __name__ == '__main__':
    main()

Fixed submission:
n, m = map(int, input().split())
h = list(map(int, input().split()))
l_n = [0] * n
for i in range(m):
    a, b = map(int, input().split())
    if h[a-1] == h[b-1]:
        l_n[a-1] = 1
        l_n[b-1] = 1
    elif h[a-1] > h[b-1]:
        l_n[b-1] = 1
    elif h[a-1] < h[b-1]:
        l_n[a-1] = 1
print(l_n.count(0))

Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
h = list(map(int, input().split()))
l_n = [True] * n
for i in range(m):
    a, b = map(int, input().split())
    elif h[a-1] >= h[b-1]:
        l_n[b-1] = False
    elif h[a-1] <= h[b-1]:
        l_n[a-1] = False
print(sum(l_n)) 

Fixed submission:
n, m = map(int, input().split())
h = list(map(int, input().split()))
l_n = [0] * n
for i in range(m):
    a, b = map(int, input().split())
    if h[a-1] == h[b-1]:
        l_n[a-1] = 1
        l_n[b-1] = 1
    elif h[a-1] > h[b-1]:
        l_n[b-1] = 1
    elif h[a-1] < h[b-1]:
        l_n[a-1] = 1
print(l_n.count(0))

Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
h = list(map(int, input().split()))
l_n = [True] * n
for i in range(m):
    a, b = map(int, input().split())
    elif h[a-False] >= h[b-False]:
        l_n[b-False] = False
    elif h[a-False] <= h[b-False]:
        l_n[a-False] = False
print(sum(l_n)) 

Fixed submission:
n, m = map(int, input().split())
h = list(map(int, input().split()))
l_n = [0] * n
for i in range(m):
    a, b = map(int, input().split())
    if h[a-1] == h[b-1]:
        l_n[a-1] = 1
        l_n[b-1] = 1
    elif h[a-1] > h[b-1]:
        l_n[b-1] = 1
    elif h[a-1] < h[b-1]:
        l_n[a-1] = 1
print(l_n.count(0))
Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline

def main():
    X = int(input())
    i = 0
    while True:
        a = (X + i**5)**(1/5)
        if isinstance(a, float):
            if a.is_integer():
                print(str(int(a))+' '+str(i))
                break

        a = (X - i**5)**(1/5)
        if isinstance(a, float):
            if a.is_integer():
                print(str(int(a))+' '+str(-i))
                break
        i += 1

if __name__ == '__main__':
    main()

Fixed submission:
import sys
input = sys.stdin.readline

def main():
    x = int(input())
    for i in range(-1000, 1000):
        for j in range(-1000, 1000):
            if x == i**5 - j**5:
                print(i, j)
                break
        else:
            continue
        break

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline

def main():
    X = int(input())
    i = 0
    while True:
        a = (X + i**5)**(1/5)
        if isinstance(a, float):
            if a.is_integer():
                print(str(int(a))+' '+str(i))
                break

        a = (X - i**5)**(1/5)
        if isinstance(a, float):
            if a.is_integer():
                print(str(int(a))+' '+str(-i))
                break
        i += 1

if __name__ == '__main__':
    main()

Fixed submission:
import sys
input = sys.stdin.readline

def main():
    x = int(input())
    for i in range(-1000, 1000):
        for j in range(-1000, 1000):
            if x == i**5 - j**5:
                print(i, j)
                break
        else:
            continue
        break

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline

def main():
    X = int(input())

    i = 0
    while True:
        a = (X + i**5)**(1/5)
        if a.is_integer():
            print(str(int(a))+' '+str(i))
            break
        a = (X - i**5)**(1/5)
        if a.is_integer():
            print(str(int(a))+' '+str(-i))
            break
        i += 1

if __name__ == '__main__':
    main()

Fixed submission:
import sys
input = sys.stdin.readline

def main():
    x = int(input())
    for i in range(-1000, 1000):
        for j in range(-1000, 1000):
            if x == i**5 - j**5:
                print(i, j)
                break
        else:
            continue
        break

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline

def main():
    n = int(input())
    a_list = list(map(int, input().split()))
    c = [0] * n
    s = 0
    for i, a in enumerate(a_list):
        if i+a < n:
            d[i+a] += 1
        if i-a >= 0:
            s += d[i-a]
    print(s)

if __name__ == '__main__':
    main()

Fixed submission:
import sys
input = sys.stdin.readline

def main():
    n = int(input())
    a_list = list(map(int, input().split()))
    c = [0] * n
    s = 0
    for i, a in enumerate(a_list):
        if i+a < n:
            c[i+a] += 1
        if i-a >= 0:
            s += c[i-a]
    print(s)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
if S = "ABC":
  print "ARC"
else:
  print "ABC"

Fixed submission:
S = input()

if S == "ABC":
  print("ARC")
else:
  print("ABC")

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

Fixed submission:
S = input()

if S == "ABC":
  print("ARC")
else:
  print("ABC")

Buggy python submission (verdict: Runtime Error):
ABC = S
ARC = S

Fixed submission:
S = input()

if S == "ABC":
  print("ARC")
else:
  print("ABC")
Buggy python submission (verdict: Runtime Error):
a,b=list(map(int,input().split()))
if a==1 or b==1:
    print(1)
else:
    print((a*w+1)//2)

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 python submission (verdict: Time Limit Exceeded):
n,m=list(map(int,input().split()))
l=list(map(int,input().split()))
l.sort()
d=[]
for i in range(0,m-1):
    d.append(l[i+1] - l[i])
try:
    for i in range(0,n-1):
        d.sort()
        ld=len(d)
        d.pop(ld-1)
    print(sum(d))
except IndexError:
    print(0)

Fixed submission:
n,m=list(map(int,input().split()))
l=list(map(int,input().split()))
l.sort()
d=[]
for i in range(0,m-1):
    d.append(l[i+1] - l[i])
d.sort()
for i in range(0,n-1):
    ld = len(d)
    if ld == 0:
        print(0)
        import sys
        sys.exit()
    d.pop(ld-1)
print(sum(d))
Buggy python submission (verdict: Runtime Error):
S = input()
if S == 'ARC:
  print("ABC")
else:print('ARC')

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

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

Fixed submission:
S = input()
if S == 'ARC':
  print("ABC")
else:print('ARC')
Buggy python submission (verdict: Runtime Error):
a = input()
b = input()
c = input()

if a < c and c < b:
  print("Yes")
else:
  print("No")


Fixed submission:
a,b,c = map(int,input().split())
if a <= c and c <= b:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
s = input()

if s[1] == 'B':
  s[1] = 'R'
else: 
  s[1] = 'B'
  
print(s)

Fixed submission:
s = list(input())
 
if s[1] == 'B':
  s[1] = 'R'
else: 
  s[1] = 'B'
  
print("".join(s))
Buggy python submission (verdict: Time Limit Exceeded):
x = int(input())
a = 0
b = 0
b2 = 0
judge = 0

"""while a**5 - b**5 < 10**9:
    while a**5 - b**5 > 0:
        if a**5 - b**5  == x:
            judge = 1
            print(a ,b)
            break
        b += 1
    else:
        a += 1
        continue
    break
"""
if judge == 0:
    a = 0
    while a**5 - b2**5 < 10**9:
        while a**5 - b2**5 > 0:
            if a**5 - b2**5  == x:
                print(a ,b2)
                break
            b2 -= 1
        else:
            a += 1
            continue
        break





Fixed submission:
x = int(input())
a = 0

while True:
    b = 0
    b2 = 0
    while a**5 - b**5 > 0 or a**5 - b2**5 < 10**9:
        if a**5 - b**5  == x:
            print(a ,b)
            break
        b += 1
        if a**5 - b2**5 == x:
            print(a ,b2)
            break
        b2 -= 1
    else:
        a += 1
        continue
    break

Buggy python submission (verdict: Time Limit Exceeded):
x = int(input())
a = 0
b = 0
b2 = 0
judge = 0

while a**5 - b**5 < 10**9:
    while a**5 - b**5 > 0:
        if a**5 - b**5  == x:
            judge = 1
            print(a ,b)
            break
        b += 1
    else:
        a += 1
        continue
    break

if judge == 0:
    a = 0
    while a**5 - b2**5 < 10**9:
        while a**5 - b2**5 > 0:
            if a**5 - b2**5  == x:
                print(a ,b2)
                break
            b2 -= 1
        else:
            a += 1
            continue
        break





Fixed submission:
x = int(input())
a = 0

while True:
    b = 0
    b2 = 0
    while a**5 - b**5 > 0 or a**5 - b2**5 < 10**9:
        if a**5 - b**5  == x:
            print(a ,b)
            break
        b += 1
        if a**5 - b2**5 == x:
            print(a ,b2)
            break
        b2 -= 1
    else:
        a += 1
        continue
    break
Buggy python submission (verdict: Runtime Error):
x, y, z = map(int, raw_input().split())
  
print(z+" "+x+" "+y)

Fixed submission:
x, y, z = map(int, raw_input().split())
  
print(str(z)+" "+str(x)+" "+str(y))
Buggy python submission (verdict: Runtime Error):

n,k,q = map(int, raw_input().split())
import numpy as np

vec = np.full(n, k, dtype=int)
for i in range(q):
  ind = np.full(n, 1, dtype=int)
  a = int(raw_input())
  ind[a-1] = 0
  vec = vec - ind
  
print('Yes' if i > 0 in vec else 'No')


Fixed submission:
s = str(raw_input())
w = ['Sunny', 'Cloudy', 'Rainy']
i = w.index(s)
if i < 2:
    print(w[i+1])
else:
    print(w[0])

Buggy python submission (verdict: Runtime Error):
s = str(raw_input())
w = ['Sunny', 'cloudy', 'Rainy']
i = w[w.index(s)]
if i < 2:
    print(w[i]+1)
else:
    print(w[0])

Fixed submission:
s = str(raw_input())
w = ['Sunny', 'Cloudy', 'Rainy']
i = w.index(s)
if i < 2:
    print(w[i+1])
else:
    print(w[0])

Buggy python submission (verdict: Runtime Error):
s = str(raw_input())
w = ['Sunny', 'cloudy', 'Rainy', 'Sunny']
print(w[w.index(s)+1])

Fixed submission:
s = str(raw_input())
w = ['Sunny', 'Cloudy', 'Rainy']
i = w.index(s)
if i < 2:
    print(w[i+1])
else:
    print(w[0])
Buggy python submission (verdict: Runtime Error):
import math
a, b = map(int, raw_input().split())
i = 0
if a == b:
    print(1)
else:
    while True:
        if (a-1)*i>=b:
            break
        i +=1
    print(i)

Fixed submission:
s= str(raw_input())
t= str(raw_input())

c = 0
for i in range(3):
    if s[i] == t[i]:
        c += 1
print(c)
Buggy python submission (verdict: Runtime Error):
n = int(raw_input())
a = map(int, raw_input().split())
b = 0.0
print(a)
for i in range(n):
    b = b + 1/float(a[i])
print(1/b)

Fixed submission:
a = int(raw_input())
s = raw_input()
if a < 3200:
    print('red')
else:
    print(s)
Buggy python submission (verdict: Runtime Error):
n = int(input())
h = [int(x) for x in input().split()]
h.reverse()
 
flag = True
 
for i in range(1, n):
    if h[i - 1] >= h[i]:
        continue
    elif h[i] == h[i - 1] + 1:
        h[i] -= 1
    else:
        flag = False
        break
 
print('Yes') if flag else print('No')

Fixed submission:
a, b, c = map(int, raw_input().split())
if (c-(a-b)) > 0:
    print(c-(a-b))
else:
    print(0)

Buggy python submission (verdict: Runtime Error):
n = raw_input()
arr = map(int, raw_input().split())

no_flag = False
length = len(arr)
tmp = arr
print(length)

if length > 1:
    for j in range(0, length-1):
        if arr[j+1] < arr[j]:
            tmp[j+1] = tmp[j+1]-1
        print(tmp)
        if tmp[j+1] < tmp[j]:
            no_flag = True
            break
    if no_flag == False:
        print("Yes")
    else:
        print("No")
else:
    print("Yes")


Fixed submission:
a, b, c = map(int, raw_input().split())
if (c-(a-b)) > 0:
    print(c-(a-b))
else:
    print(0)

Buggy python submission (verdict: Runtime Error):
n = int(raw_input())
if n < 10:
    print(n)
elif n >= 10 and n < 100:
    print(9)
elif n >=100 and n < 1000:
    print((n-100) + 10)
elif n >=1000 and n < 10000:
    print(909)
elif n >= 10000 and n < 100000:
    print((n-10000) + 910)
elif n == 100000:
    print(90909)

Fixed submission:
a, b, c = map(int, raw_input().split())
if (c-(a-b)) > 0:
    print(c-(a-b))
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
a = input('A: ')
b = input('B: ')
c = int(a + b)

def judge_int():
    if c % 2 == 0:
        return c/2
    elif c % 2 != 0:
        return "IMPOSSIBLE"

print(judge_int())


Fixed submission:
l = map(int, raw_input().split())
a = l[0]
b = l[1]
c = int(a + b)

def judge_int():
    if c % 2 == 0:
        return c/2
    elif c % 2 != 0:
        return "IMPOSSIBLE"

print(judge_int())

Buggy python submission (verdict: Runtime Error):
a = input('A: ')
b = input('B: ')
c = int(a + b)

def judge_int():
    if c % 2 == 0:
        return c/2
    elif c % 2 != 0:
        return "IMPOSSIBLE"

print(judge_int())


Fixed submission:
l = map(int, raw_input().split())
a = l[0]
b = l[1]
c = int(a + b)

def judge_int():
    if c % 2 == 0:
        return c/2
    elif c % 2 != 0:
        return "IMPOSSIBLE"

print(judge_int())
Buggy python submission (verdict: Runtime Error):
n = int(raw_input())
a = []
for i in range(n):
    a.append(int(raw_input()))

b = [ 0 if i == max(a) else i for i in a ]
if max(b) == 0:
    b = [ max(a) if i == max(a) else i for i in a ]

print([ max(b) if i == max(a) else max(a) for i in a ])

Fixed submission:
r = int(raw_input())
print(3*r*r)
Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())

have_snack = [0 for i in range(N)]

for k in range(K):
    hito_len = int(input())
    have_hito = map(int, input().split())
    for hh in range(have_hito):
        have_snack[hh - 1] = 1

print(have_snack.count(0))


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

have_snack = [0 for i in range(N)]

for k in range(K):
    hito_len = int(input())
    have_hito = list(map(int, input().split()))
    for hh in have_hito:
        have_snack[hh - 1] = 1

print(have_snack.count(0))
Buggy python submission (verdict: Runtime Error):
N=int(input())
S=input()

str_list = list(S)

count = 0
for i in range(len(str_list)):
    string = str_list[i]
    if string == 'A':
        i += 1
        string = str_list[i]
    if string == 'B':
        i += 1
        string = str_list[i]
    if string == 'C':
        count += 1

print(count)

Fixed submission:
N=int(input())
S=input()

print(S.count("ABC"))
Buggy python submission (verdict: Runtime Error):
s = list(map(int, input().split()))

sunuke = []
ans = 0
for n in range(s[0]):
  sunuke.append(0)
for n in range(len(s)):
  d = input()
  a = list(map(int, input().split()))
  for n2 in a:
    sunuke[n2-1] += 1
for n in sunuke:
  if n == 0:
    ans += 1
print(ans)

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

sunuke = []
ans = 0
for n in range(s[0]):
  sunuke.append(0)
for n in range(s[1]):
  d = input()
  a = list(map(int, input().split()))
  for n2 in a:
    sunuke[n2-1] += 1
for n in sunuke:
  if n == 0:
    ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
n,a,b = (int(input()) for i in range(3))
ans = 0
count = 0
for i in range(n+1):
    j = i
    ans = 0
    while(i is not 0):
        ans = ans + i%10
        i = int(i/10)
    if ans >= a and ans <= b:
        count = count +j
print(count)

Fixed submission:
n = list(map(int,input().split()))
ans = 0
count = 0
for i in range(n[0]+1):
    j = i
    ans = 0
    while(i is not 0):
        ans = ans + i%10
        i = int(i/10)
    if ans >= n[1] and ans <= n[2]:
        count = count +j
print(count)
Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
H = list(map(int,input().split()))
P = [0] * N
for i in range(M) :
    q = list(map(int,input().split()))
    p = P[q[0]-1]
    h = H[q[1]-1]
    if p < h :
        P[q[0]-1] = H[q[1]-1]
    if p > h :
        P[q[1]-1] = H[q[0]-1]

R = 0
for i in range(N) :
    if H[i] > P[i] :
        R += 1
print(R)

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

Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
H = list(map(int,input().split()))
P = [0] * N
for i in range(M) :
    q = list(map(int,input().split()))
    p = P[q[0]-1]
    h = H[q[1]-1]
    if p < h :
        P[q[0]-1] = H[q[1]-1]
    if p > h :
        P[q[1]-1] = H[q[0]-1]

R = 0
for i in range(N) :
    if H[i] > P[i] :
        R += 1
print(R)

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

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

Fixed submission:
S = input()
if S == 'ABC' :
    Next = 'ARC'
else :
    Next = 'ABC'
print (Next)
Buggy python submission (verdict: Runtime Error):
import math
R = int(input())
print(2 * R * math.pi 

Fixed submission:
import math
r = int(input())
print(2 * r * math.pi)
Buggy python submission (verdict: Runtime Error):
import math

n,m = map(int, input().rstrip().split())

value = 0
s = [-1] * n

for i in range(m) :
    si,ci = map(int,input().rstrip().split())
    if s[si-1] == -1 :
        s[si-1] = ci
    elif s[si-1] != ci :
        print(-1)
        sys.exit()
    else :
        continue

if s[0] == 0 and n > 1:
    print(-1)
    sys.exit()
if s[0] == -1 :
    s[0] = 1
for i in range(n) :
    if s[i] == -1 :
        s[i] = 0 
if value != -1 :
    for i in range(n) :
        value = value * 10 + s[i] 
print(value)

Fixed submission:
import math

n,m = map(int, input().rstrip().split())

value = 0
s = [-1] * n

for i in range(m) :
    si,ci = map(int,input().rstrip().split())
    if s[si-1] == -1 :
        s[si-1] = ci
    elif s[si-1] != ci :
        value = -1
        break
    else :
        continue

if s[0] == 0 and n > 1:
    value = -1

for i in range(n) :
    if s[i] == -1 :
      if i == 0 and n > 1:
        s[i] = 1
      else :
        s[i] = 0 
if value != -1 :
    for i in range(n) :
        value = value * 10 + s[i] 
print(value)