Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N,X=map(int,input().split())
L = [int(i) for i in input().split()] 

a=0
for i in range(N):
    a+=L[i]
    if a > X:
        ans=i+1
        break

print(ans)
        

Fixed submission:
N,X=map(int,input().split())
L = [int(i) for i in input().split()] 
ans=N+1
a=0
for i in range(N):
    a+=L[i]
    if a > X:
        ans=i+1
        break

print(ans)

Buggy python submission (verdict: Runtime Error):
N,X=map(int,input().split())
L = [int(i) for i in input().split()] 

a=0
for i in range(N+1):
    a+=L[i]
    if a > X:
        ans=i+1
        break

print(ans)
        

Fixed submission:
N,X=map(int,input().split())
L = [int(i) for i in input().split()] 
ans=N+1
a=0
for i in range(N):
    a+=L[i]
    if a > X:
        ans=i+1
        break

print(ans)
Buggy python submission (verdict: Runtime Error):
n,k=input().split()
ans=n-k+1

Fixed submission:
n,k=map(int,input().split())
print(n-k+1)
Buggy python submission (verdict: Runtime Error):
import math
n=int(input())
l=[]
for i in range(n):
    l.append(int(input()))

print(math.ceil(n/min(l))-1+5)



Fixed submission:
import math
n = int(input())
l = [int(input()) for i in range(5)] 
print(math.ceil(n/min(l))-1+5)
Buggy python submission (verdict: Runtime Error):
n=int(input())
ans=0
for i in range(n):
    x,u=map(int,input().split())
    x=float(x)
    if u == 'BTC':
        x=x*380000.
    ans+=x
print(ans)

Fixed submission:
n=int(input())
ans=0
for i in range(n):
    x,u=input().split()
    x=float(x)
    
    if u == 'BTC':
        x=x*380000.
    ans+=x
print(ans)

Buggy python submission (verdict: Runtime Error):
n=int(input())
ans=0
for i in range(n):
    x,u=map(int,input().split())
    if u == 'BTC':
        x=x*380000.
    ans+=x
print(ans)

Fixed submission:
n=int(input())
ans=0
for i in range(n):
    x,u=input().split()
    x=float(x)
    
    if u == 'BTC':
        x=x*380000.
    ans+=x
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
ans=0
for i in range(1,n+1):
    a=sorted(set(str(i)))
    if a == ['3','5','7']:
        ans+=1
print(ans)



Fixed submission:
import itertools as it
n=int(input())
ans=0
for nn in range(3,10):
    l=[ i for i in it.product(['3','5','7'], repeat=nn)]
    for ll in l:
        if int(''.join(ll)) <= n:
            if len(set(ll)) ==3:
                ans+=1

print(ans)
Buggy python submission (verdict: Runtime Error):
N,T=map(int,input().split())
l=[]
for i in range(N):
    c,t=map(int,input().split())
    if t <= T:
        l.append(c)
if len(c) > 0:
    print(min(c))        
else:
    print("TLE")



Fixed submission:
N,T=map(int,input().split())
l=[]
for i in range(N):
    c,t=map(int,input().split())
    if t <= T:
        l.append(c)
if len(l) > 0:
    print(min(l))        
else:
    print("TLE")
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input().split())

print(max(a,b,c)*9+sum(a,b,c)

Fixed submission:
l=list(map(int,input().split()))
print(max(l)*9+sum(l))
Buggy python submission (verdict: Runtime Error):
from math import gcd
from functools import reduce


def lcm_base(x, y):
    return (x * y) // gcd(x, y)


def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)


n = int(input())
a = list(map(int, input().split()))
ll = lcm_list(a) - 1
ans = 0
for i in a:
    ans += (ll % i)
print(ans)


Fixed submission:

from fractions import gcd
from functools import reduce


def lcm_base(x, y):
    return (x * y) // gcd(x, y)


def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)


n = int(input())
a = list(map(int, input().split()))
ll = lcm_list(a) - 1
ans = 0
for i in a:
    ans += (ll % i)
print(ans)
Buggy python submission (verdict: Runtime Error):
n=int(input())
if n%2==0:print(n)
else print(n*2)

Fixed submission:
n=int(input())
if n%2==0:
    print(n)
else:
    print(n*2)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
a.append(0)
for i in range(n):
    x = 0
    s = 0
    for j in range(n+1):
        if i != j:
            s += abs(x - a[j])
            x = a[j]
    print(s)


Fixed submission:
n = int(input())
l = list(map(int, input().split()))
a = [0] + l + [0]
s = 0
x = 0
for i in range(n + 2):
    s += abs(x - a[i])
    x = a[i]

for i in range(1, n + 1):
    t = s + abs(a[i + 1] - a[i - 1])
    t = t - abs(a[i] - a[i - 1])
    t = t - abs(a[i + 1] - a[i])
    print(t)
Buggy python submission (verdict: Runtime Error):
a,b,c,x=map(int,input().split())
ans=0
for i in range(a+1):
    for j i range(b+1):
        for k in range(c+1):
            if x == 500*i+100*j+50*k:
                ans+=1
print(ans)


Fixed submission:
a=int(input())
b=int(input())
c=int(input())
x=int(input())
ans=0
for i in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if x == 500*i+100*j+50*k:
                ans+=1
print(ans)
Buggy python submission (verdict: Runtime Error):
x,y=input().split()
if x>Y:print(">"):
elif x<Y:print("<")
else:print("=")

Fixed submission:
x,y=input().split()
if x>y:print(">")
elif x<y:print("<")
else:print("=")
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a= [int(input()) for i in range(n)] 

a.sort()
b=set(a)
ans=0
for i in b:
    if a.count(i)%2!=0 :ans+=1
print(ans)

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

a.sort()
ans=0
m=1

for i in range(1,n):
    if a[i-1] == a[i]:
        m+=1
    else:
        ans+=(m%2)
        m=1

ans+=(m%2)

print(ans)
Buggy python submission (verdict: Runtime Error):
print(input()[::2])

Fixed submission:
print(input()[::2])

Buggy python submission (verdict: Runtime Error):
s=input()
print(s[::2]

Fixed submission:
print(input()[::2])
Buggy python submission (verdict: Runtime Error):
import sys
s=list(input())
s=list(set(s))
s.sort()
#print(s)
for i in range(26):
    if chr(ord("a")+i)!=s[i]:
        print(chr(ord("a")+i))
        sys.exit()
print("None")

Fixed submission:
import sys
s=list(input())
s=list(set(s))
s.sort()
s.append("eof")

for i in range(26):
    if chr(ord("a")+i)!=s[i]:
        print(chr(ord("a")+i))
        sys.exit()
print("None")
Buggy python submission (verdict: Runtime Error):
import math
from functools import reduce
def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)
def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

n=int(input())
t=[int(input()) for i in range(n)] 

print(lcm_list(t))

Fixed submission:
import fractions
from functools import reduce
def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)
def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)
 
n=int(input())
t=[int(input()) for i in range(n)] 
 
print(lcm_list(t))

Buggy python submission (verdict: Runtime Error):
import fractions

n=int(input())
t=[]
for i in range(n):
    t.append(int(input()))

if n == 1:
    ans=1

if n > 1:
    ans=t[0]
    for j in range(1,n):
        ans=int(ans*t[j]/fractions.gcd(ans,t[j]))
    
print(ans)

Fixed submission:
import fractions
from functools import reduce
def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)
def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)
 
n=int(input())
t=[int(input()) for i in range(n)] 
 
print(lcm_list(t))

Buggy python submission (verdict: Runtime Error):
import math

n=int(input())
t=[]
for i in range(n):
    t.append(int(input()))

if n == 1:
    ans=1

if n > 1:
    ans=t[0]
    for j in range(1,n):
        ans=int(ans*t[j]/math.gcd(ans,t[j]))

Fixed submission:
import fractions
from functools import reduce
def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)
def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)
 
n=int(input())
t=[int(input()) for i in range(n)] 
 
print(lcm_list(t))

Buggy python submission (verdict: Runtime Error):
import math

n=int(input())
t=[]
for i in range(n):
    t.append(int(input()))

if n == 1:
    ans=1
else:
    ans=math.gcd(t[0],t[1])

if n > 2:
    for j in range(2,n):
        ans=math.gcd(ans,t[j])

seki=1
for i in t:
    seki=seki*i
    
print(int(seki/ans))

Fixed submission:
import fractions
from functools import reduce
def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)
def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)
 
n=int(input())
t=[int(input()) for i in range(n)] 
 
print(lcm_list(t))

Buggy python submission (verdict: Runtime Error):
import math

n=int(input())
t=[]
for i in range(n):
    t.append(int(input()))

if n == 1:
    ans=1
else:
    ans=math.gcd(t[0],t[1])

if n > 2:
    for j in range(2,n):
        ans=gcd(ans,t[j])

seki=1
for i in t:
    seki=seki*i
    
print(int(seki/ans))

Fixed submission:
import fractions
from functools import reduce
def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)
def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)
 
n=int(input())
t=[int(input()) for i in range(n)] 
 
print(lcm_list(t))
Buggy python submission (verdict: Runtime Error):
s=input()
n=len(s)-2
print(s[:1]+str(n)+s[-1:])

Fixed submission:
s=input()
n=len(s)-2
print(s[:1]+str(n)+s[-1:])
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a %3==0 or b%3== or (a+b)%3==0:
  print("Possible")
else:
  print("Impossible")

Fixed submission:
a, b = map(int, input().split())
if a % 3 == 0 or b % 3 == 0 or (a + b) % 3 == 0:
    print("Possible")
else:
    print("Impossible")
Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
l=list(map(int,input().split()))
a=0
l.sort(reverse=True)
for i in range(k):
    a+=l[i]
print(a)

Fixed submission:
n,k=map(int,input().split())
l=list(map(int,input().split()))
a=0
l.sort(reverse=True)
for i in range(k):
    a+=l[i]
print(a)

Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
l=list(map(int,input().split()))
a=0
l.sort(reverse=True)
for i in range(k):
    a+=l[i]
print(a)


Fixed submission:
n,k=map(int,input().split())
l=list(map(int,input().split()))
a=0
l.sort(reverse=True)
for i in range(k):
    a+=l[i]
print(a)

Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
l=list(map(int,input().split()))
a=0
l.sort()
for i in range(k):
    a+=l[i]
print(l)


Fixed submission:
n,k=map(int,input().split())
l=list(map(int,input().split()))
a=0
l.sort(reverse=True)
for i in range(k):
    a+=l[i]
print(a)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
b=[]
for i,j in enumerate(a):
    if (i+1) % 2 == 1:
        b.insert(0, j)
    else:
        b.append(j)
        
if len(a) % 2 == 0:
    for i in b[::-1]:
        print(i,end=" ")
else:
    for i in b:
        print(i,end=" ")
    

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
b0=[]
b1=[]
for i,j in enumerate(a):
    if (i+1) % 2 == 1:#奇数
        b1.append(j)
    else:#偶数
        b0.append(j)
        
if len(a) % 2 == 0:#偶数だったら逆
    for i in b0[::-1]:
        print(i,end=" ")
    for i in b1:
        print(i,end=" ")
else:
    for i in b1[::-1]:
        print(i,end=" ")
    for i in b0:
        print(i,end=" ")
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
a.sort()
print(a[n]-a[0])

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
a.sort()
print(a[n-1]-a[0])
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
rank=[0]*9
for i in a:
    rank[i//400]+=1

s=0
for i in range(8):
    if rank[i]>0:
        s+=1
if s>0:
    s1=s
else:
    s1=1
s2=s+rank[8]
print(s1,s2)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
rank = [0] * 9
for i in a:
    if i < 3200:
        rank[i // 400] += 1
    else:
        rank[8] += 1

s = 0
for i in range(8):
    if rank[i] > 0:
        s += 1
if s > 0:
    s1 = s
else:
    s1 = 1
s2 = s + rank[8]
print(s1, s2)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
rank=[0]*9
for i in a:
    rank[i//400]+=1

s=0
for i in range(8):
    if rank[i]>0:
        s+=1
if s>0:
    s1=s
else:
    s1=1
s2=s+rank[8]
print(s1,s2)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
rank = [0] * 9
for i in a:
    if i < 3200:
        rank[i // 400] += 1
    else:
        rank[8] += 1

s = 0
for i in range(8):
    if rank[i] > 0:
        s += 1
if s > 0:
    s1 = s
else:
    s1 = 1
s2 = s + rank[8]
print(s1, s2)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
s=[]
for i in range(n):
    s.append(int(input()))
s.sort(reverse=True)
S=sum(s)

while S % 10 == 0:
    for j in s:
        S=sum(s)-j
print(S)

    

Fixed submission:
n=int(input())
s=[]
for i in range(n):
    s.append(int(input()))
s.sort()
S=sum(s)
ans=S
min=-1
if S % 10 == 0:
    for i in s:
        if i % 10 != 0:
            min=i
            break
else:
  min=0
  
if min >= 0:
    print(ans-min)
else:
    print(0)
Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
ll=[list(map(int,input().split())) for i in range(n)]

l=[]
for i in ll:
    for j in range(i[1]):
        l.append(i[0])
l.sort()
print(l[k-1])


Fixed submission:
n, k = map(int, input().split())
ab = [list(map(int, input().split())) for i in range(n)]
l = [0] * (10 ** 5 + 1)
for i in ab:
    l[i[0]] += i[1]
s = 0
for i in range(10 ** 5 + 1):
    s += l[i]
    if s >= k:
        print(i)
        break
Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
g=[list(map(int,input().split())) for i in range(n)] 
c=[list(map(int,input().split())) for i in range(m)] 

for i in g:
    tmp=1000
    
    for j in range(m):
        t2=abs(i[0]-c[j][0]) + abs(i[1]-c[j][1])
        if t2 <tmp:
            no=j+1
            tmp=t2
            
    print(no)



Fixed submission:
n,m=map(int,input().split())
g=[list(map(int,input().split())) for i in range(n)] 
c=[list(map(int,input().split())) for i in range(m)] 

for i in g:
    tmp=10**9
    
    for j in range(m):
        t2=abs(i[0]-c[j][0]) + abs(i[1]-c[j][1])
        if t2 <tmp:
            no=j+1
            tmp=t2
            
    print(no)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
p=1
for i in range(1,n+1):
   p=p*i 
print(p%(10**9+7))


Fixed submission:
n=int(input())
p=1
m=10**9+7
for i in range(1,n+1):
   p=p*i%m
print(p%m)
Buggy python submission (verdict: Runtime Error):
sa=list(input())
sb=list(input())
sc=list(input())

n=sa.pop(0)
while True:
    if n == 'a':
        if len(sa)==0:
            print('A')
            break
        n=sa.pop(0)
    elif n == 'b':
        if len(sa)==0:
            print('B')
            break
        n=sb.pop(0)
    elif n == 'c':
        if len(sa)==0:
            print('C')
            break
        n=sc.pop(0)

Fixed submission:
sa=list(input())
sb=list(input())
sc=list(input())

n=sa.pop(0)
while True:
    if n == 'a':
        if len(sa)==0:
            print('A')
            break
        n=sa.pop(0)
    elif n == 'b':
        if len(sb)==0:
            print('B')
            break
        n=sb.pop(0)
    elif n == 'c':
        if len(sc)==0:
            print('C')
            break
        n=sc.pop(0)
Buggy python submission (verdict: Runtime Error):
s = input()
if s == 'ABC':
    return 'ARC'
else:
    return 'ABC'

Fixed submission:
s = input()
if s == 'ABC':
    print('ARC')
else:
    print('ABC')
Buggy python submission (verdict: Time Limit Exceeded):
import sys
x = int(input())


number = int(x/100)
xn = x-number*100
number = number+1

for i in range(0,number):
    for j in range(0,number-i):
        for k in  range (0,number-i-j):
            for l in range(0,number-i-j-k):
                for m in range(0,number-i-j-k-l):
                    for n in range(0,number-i-j-k-l-m):
                        if j*1+k*2+l*3+m*4+n*5==xn:
                            if i*100+j*101+k*102+l*103+m*104+n*105==x:
                                print(1)
                                sys.exit()
print(0)

Fixed submission:
import sys
x = int(input())


number = int(x/100)
number = number+1

for i in range(0,number):
    for j in range(0,number-i):
        for k in  range (0,number-i-j):
            for l in range(0,number-i-j-k):
                for m in range(0,number-i-j-k-l):
                    for n in range(0,number-i-j-k-l-m):
                        if i*100+j*101+k*102+l*103+m*104+n*105==x:
                            print(1)
                            sys.exit()
print(0)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
x = int(input())


number = int(x/100)
xn = x-number*100
number = number+1

for i in range(0,number):
    for j in range(0,number):
        for k in  range (0,number):
            for l in range(0,number):
                for m in range(0,number):
                    for n in range(0,number):
                        if j*1+k*2+l*3+m*4+n*5==xn:
                            if i*100+j*101+k*102+l*103+m*104+n*105==x:
                                print(1)
                                sys.exit()
print(0)

Fixed submission:
import sys
x = int(input())


number = int(x/100)
number = number+1

for i in range(0,number):
    for j in range(0,number-i):
        for k in  range (0,number-i-j):
            for l in range(0,number-i-j-k):
                for m in range(0,number-i-j-k-l):
                    for n in range(0,number-i-j-k-l-m):
                        if i*100+j*101+k*102+l*103+m*104+n*105==x:
                            print(1)
                            sys.exit()
print(0)
Buggy python submission (verdict: Runtime Error):
n= int(input())
a = list(int(i) for i in input().split())
import math
import sys

sta=sum(a)/2
sum=0
ans=0
for i in range(0,n-1):
    if sum==sta:
        print(0)
        sys.exit()
    elif sum<sta and sum+a[i]>sta:
        ans=min(sta-sum,sum+a[i]-sta)/0.5
        print(int(ans))
        sys.exit()
    else:
        sum+=a[i]

ans=min(sta-sum,sum+a[n]-sta)/0.5
print(abs(int(ans)))

Fixed submission:
n= int(input())
a = list(int(i) for i in input().split())
import math
import sys

sta=sum(a)/2
sum=0
ans=0
for i in range(0,n-1):
    if sum==sta:
        print(0)
        sys.exit()
    elif sum<sta and sum+a[i]>sta:
        ans=min(sta-sum,sum+a[i]-sta)/0.5
        print(int(ans))
        sys.exit()
    else:
        sum+=a[i]

ans=min(sta-sum,sum+a[n-1]-sta)/0.5
print(abs(int(ans)))

Buggy python submission (verdict: Runtime Error):
n= int(input())
a = list(int(i) for i in input().split())
import math
import sys

sta=sum(a)/2
sum=0
ans=0
for i in range(0,n-1):
    if sum==sta:
        print(0)
        sys.exit()
    elif sum<sta and sum+a[i+1]>sta:
        ans=min(sta-sum,sum+a[i]-sta)/0.5
        print(int(ans))
        sys.exit()
    else:
        sum+=a[i]

ans=min(sta-sum,sum+a[n]-sum)/0.5
print(ans)

Fixed submission:
n= int(input())
a = list(int(i) for i in input().split())
import math
import sys

sta=sum(a)/2
sum=0
ans=0
for i in range(0,n-1):
    if sum==sta:
        print(0)
        sys.exit()
    elif sum<sta and sum+a[i]>sta:
        ans=min(sta-sum,sum+a[i]-sta)/0.5
        print(int(ans))
        sys.exit()
    else:
        sum+=a[i]

ans=min(sta-sum,sum+a[n-1]-sta)/0.5
print(abs(int(ans)))
Buggy python submission (verdict: Runtime Error):
n=int(input())
import sys
import math
list=[]


for i in range(0,int(math.sqrt(n))):
    if n%(i+1)==0:
        list.append(i-1+(n/(i+1)))

print(int(min(list)))

Fixed submission:
x,y = map(int,input().split())
import sys

if x>9 or y>9:
    print(-1)
else:
    print(x*y)
Buggy python submission (verdict: Runtime Error):
N,M=map(int,input().split())
high_list=list(map(int,input().split()))
pathlist=[]
for i in range(M):
    pathlist.append(list(map(int,input().split())))
waylist=[0]*N
ans=0
#i行目にi番目から行ける展望台をすべて入れる
for n in range(1,N+1):
    for m in pathlist:
        if(n in m):#もし経路に入っていたら
            if(m[0]==n):#自身じゃない方の高さを代入
                if(high_list[n-1]>high_list[m[1]-1]):
                    ans=ans+1
            else:
                if(high_list[n-1]>high_list[m[0]-1]):
                    ans=ans+1
print(ans)




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

Buggy python submission (verdict: Runtime Error):
N,M=map(int,input().split())
high_list=list(map(int,input().split()))
pathlist=[]
for i in range(M):
    pathlist.append(list(map(int,input().split())))
waylist=[0]*N
#i行目にi番目から行ける展望台をすべて入れる
for n in range(1,N+1):
    for m in pathlist:
        if(n in m):#もし経路に入っていたら
            if(m[0]==n):#自身じゃない方の高さを代入
                if(waylist[n-1],high_list[m[1]-1]):
                    waylist[n-1]=high_list[m[1]-1]
            else:
                if( waylist[n-1]<high_list[m[0]-1]):
                    waylist[n-1]=high_list[m[0]-1]

answer=0
for n in range(N):
    if(waylist[n]<high_list[n]):
        answer=answer+1

print(answer)




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

Buggy python submission (verdict: Runtime Error):
import numpy  as np
N,M=map(int,input().split())
high_list=list(map(int,input().split()))
pathlist=[]
for i in range(M):
    pathlist.append(list(map(int,input().split())))
waylist=np.array([[0]*N]*N)
#i行目にi番目から行ける展望台をすべて入れる
for n in range(1,N+1):
    for m in pathlist:
        if(n in m):#もし経路に入っていたら
            if(m[0]==n):#自身じゃない方の高さを代入
                waylist[n-1][m[1]-1]=high_list[m[1]-1]
            else:
                waylist[n-1][m[0]-1]=high_list[m[0]-1]

answer=0
for n in range(N):
    if(waylist[n].max()<high_list[n]):
        answer=answer+1

print(answer)




Fixed submission:
x=input()
print('ARC' if x == 'ABC' else 'ABC')
Buggy python submission (verdict: Runtime Error):
N,K=map(int,input().split())
arr=[]
ans=[str(i) for  i in range(1,N+1)]
for i in range(K):
    _=input()
    arr.extend((input().split()))
    arr=list(set(arr))
p=0
for n  in  ans:
    if(!(n in arr) ) :
        p=p+1
print(p)




Fixed submission:
N,K=map(int,input().split())
arr=[]
ans=[str(i) for  i in range(1,N+1)]
for i in range(K):
    _=input()
    arr.extend((input().split()))
    arr=list(set(arr))
p=0
for n  in  ans:
    if(not(n in arr) ) :
        p=p+1
print(p)
Buggy python submission (verdict: Runtime Error):
1 2
a, b= map(int , input().split())
print (a)
print (b)
unsafe
s = input()
print(s)


Fixed submission:
s, w = map(int, input() .split())
if w >= s:
    print("unsafe")
else:
    print("safe")
Buggy python submission (verdict: Runtime Error):
import itertools^M
N,K = list(map(int, input().split(" ")))^M
A = list(itertools.chain.from_iterable([input().split(" ")  for i in range(K) if input().split(" ")]))^M
A = list(map(int, A))
none = [a for a in range(1, K + 1) if a not in A]
print(len(none))

Fixed submission:
import itertools

inp2intlist = lambda inp:list(map(int,inp))

N,K = list(map(int, input().split(" ")))
A = list(itertools.chain.from_iterable([inp2intlist(input().split())  for i in range(K) if input().split()]))

print(N - len(set(A)))
Buggy python submission (verdict: Runtime Error):
a, b, c =map(int,input().split())
if a == b and a != c:
    print("Yes")
elif a == c and a != b:
    print("Yes")
elif b == c and a != b:
    peint("Yes")
else:
    print("No")

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

if a == b and a != c:
    print('Yes')
elif a == c and a != b:
    print('Yes')
elif b == c and a != b:
    print('Yes')
else:
    print('No')

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

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

if a == b and a != c:
    print('Yes')
elif a == c and a != b:
    print('Yes')
elif b == c and a != b:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
n = int(input())
num = 0
for i in range(1, n+1):
    if i%2 != 0
    num += 1
    
print(num/n)

Fixed submission:
n = int(input())
num = 0
for i in range(1, n+1):
    if i % 2 != 0:
        num += 1
          
print(num/n)

Buggy python submission (verdict: Runtime Error):
n = int(input())
num = 0
for i in range(1, n+1):
    if i%2 != 0
    num += 1
    
print(num/n)

Fixed submission:
n = int(input())
num = 0
for i in range(1, n+1):
    if i % 2 != 0:
        num += 1
          
print(num/n)