Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 18
MOD = 10 ** 9 + 7

N, X = MAP()
A = LIST()

dp = list2d(N, N, INF)
for i in range(N):
    k = 0
    for j in range(i, i-N, -1):
        j %= N
        dp[i][k] = min(dp[i][(k-1)%N], A[j])
        k += 1

ans = [0] * N
for i in range(N):
    for j in range(N):
        ans[j] += dp[i][j]
    ans[i] += i * X
print(min(ans))


Fixed submission:
# -*- coding: utf-8 -*-

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 18
MOD = 10 ** 9 + 7

N, X = MAP()
A = LIST()

dp = list2d(N, N, INF)
for i in range(N):
    k = 0
    for j in range(i, i-N, -1):
        j %= N
        dp[i][k] = min(dp[i][(k-1)%N], A[j])
        k += 1

ans = [0] * N
for i in range(N):
    for j in range(N):
        ans[j] += dp[i][j]
    ans[i] += i * X
print(min(ans))
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 18
MOD = 10 ** 9 + 7

N, X, Y, Z = MAP()
M = X + Y + Z

# XYZとの一致をチェックするビット列
check = 1<<(X+Y+Z-1) | 1<<(Y+Z-1) | 1<<(Z-1)
dp = list2d(N+1, 1<<(M-1), 0)
# dp[i][S] := i個目まで見て、前の値M-1以下までの集合がSの時の、XYZを含まないものの通り数
dp[0][0] = 1
msk1 = (1<<M) - 1
msk2 = (1<<(M-1)) - 1
for i in range(N):
    for S in range(1<<(M-1)):
        if not dp[i][S]:
            continue
        for j in range(10):
            # 1ビットずらして1を足してjビットずらしてマスクする
            S2 = (S<<1|1)<<j & msk1
            # 直前Mビットで使った値がXYZと一致していないか確認する
            if not (S2 & check) == check:
                dp[i+1][S2&msk2] += dp[i][S]
                dp[i+1][S2&msk2] %= MOD
total = pow(10, N, MOD)
cnt = 0
for S in range(1<<(M-1)):
    cnt += dp[N][S]
    cnt %= MOD
print((total-cnt)%MOD)


Fixed submission:
# -*- coding: utf-8 -*-

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 18
MOD = 10 ** 9 + 7

N, X, Y, Z = MAP()
M = X + Y + Z

# XYZとの一致をチェックするビット列
check = 1<<(X+Y+Z-1) | 1<<(Y+Z-1) | 1<<(Z-1)
dp = list2d(N+1, 1<<(M-1), 0)
# dp[i][S] := i個目まで見て、前の値M-1以下までの集合がSの時の、XYZを含まないものの通り数
dp[0][0] = 1
msk1 = (1<<M) - 1
msk2 = (1<<(M-1)) - 1
for i in range(N):
    for S in range(1<<(M-1)):
        if not dp[i][S]:
            continue
        for j in range(10):
            # 1ビットずらして1を足してjビットずらしてマスクする
            S2 = (S<<1|1)<<j & msk1
            # 直前Mビットで使った値がXYZと一致していないか確認する
            if not (S2 & check) == check:
                dp[i+1][S2&msk2] += dp[i][S]
                dp[i+1][S2&msk2] %= MOD
total = pow(10, N, MOD)
cnt = 0
for S in range(1<<(M-1)):
    cnt += dp[N][S]
    cnt %= MOD
print((total-cnt)%MOD)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

N, L = map(int, input().split())
str_list = [input() for i in range(L)]

str_list.sort()

ans = ""
for i in range(L):
    ans += str_list[i]

print(ans)

Fixed submission:
# -*- coding: utf-8 -*-

N, L = map(int, input().split())
str_list = [input() for i in range(N)]

str_list.sort()

ans = ""
for i in range(N):
    ans += str_list[i]

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
def maximum(l,ind):
	max=-90000000
	for i in range(0,len(l)):
		if(i!=ind):
			if(l[i]>max):
				max=l[i]
	return max
n=int(input())
l=[]
for i in range(0,n):
	l.append(int(input()))
for i in range(0,n):
	print(maximum(l,i))

Fixed submission:
n=int(input())
l=[]
for i in range(n):
	l.append(int(input()))
copy=sorted(l,reverse=True)
for i in range(n):
	if(copy[0]==l[i]):
		print(copy[1])
	else:
		print(copy[0])
Buggy python submission (verdict: Runtime Error):
n=int(input())
water=list(map(int,input().split()))
x=[]
temp=0
for i in range(1,n,2):
    temp+=water[i]
x.append(sum(water)-2*temp)
for j in range(n-1):
    x.append(2*water[j]-x[-1])
res=map(str,x)
print(' '.join(res))

Fixed submission:
s=input()
h=set()
for i in range(0,len(s)):
	h.add(s[i])
if(len(h)==2):
	print("Yes")
else:
	print("No")
Buggy python submission (verdict: Runtime Error):
a=input()
b=input()
s=str(a)+str(b)
x=int(s)
flag=0
for i in range(1000):
	if i*i==x:
		flag=1
if flag==0:
	print('No')
else:
	print('Yes')


Fixed submission:
a,b=map(int,input().split())
s=str(a)+str(b)
x=int(s)
flag=0
for i in range(1000):
	if i*i==x:
		flag=1
if flag==0:
	print('No')
else:
	print('Yes')
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())

class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())
uf = UnionFind(N)
#print(uf.parents)

for i in range(M):
    a = list(map(int, input().split()))
    uf.union(a[0], a[1])

print(uf.group_count()-1)

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

class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())
uf = UnionFind(N)
#print(uf.parents)

for i in range(M):
    a = list(map(int, input().split()))
    uf.union(a[0]-1, a[1]-1)
#print(uf)
print(uf.group_count()-1)
Buggy python submission (verdict: Time Limit Exceeded):
import itertools
N = int(input())
A=list(map(int, input().split()))
total=0

for v in itertools.combinations(A, 2):
    total += v[0]*v[1]
    #print(v)
print(total%(10**9+7))

Fixed submission:
N = int(input())
A=list(map(int, input().split()))
B=[A[N-1]]
#print(B[0])
for i in range(len(A)-2):
    #print(i)
    b=B[i]+A[N-2-i]
    B.append(b)
#print(B)
total=0
for i in range(len(B)):
    total += A[i]*B[len(B)-1-i]

print(total%(10**9+7))
Buggy python submission (verdict: Runtime Error):
H, W, M = map(int, input().split())
B = []
c={}
d={}

for i in range(M):
    b = list(map(int, input().split()))
    if b[0] not in c.keys():
        c[b[0]] =1
    else:
        c[b[0]] +=1
        
    if b[1] not in d.keys():
        d[b[1]] =1
    else:
        d[b[1]] +=1
    B.append(b)
#print(B)
#print(c,d,B)
c_max =max(c.values())
cc = [kv[0] for kv in c.items() if kv[1] == c_max]
d_max= max(d.values())
dd = [kv[0] for kv in d.items() if kv[1] == d_max]
#print(c_max,d_max)
#print(cc,c_max,dd,d_max)
if c_max == H and d_max== W:
    print((c_max+d_max)-1)
else:    
    for i in range (len(cc)):
        for n in range(len(dd)):
            #print(i, n, cc[i], dd[n])
            if [cc[i], dd[n]] not in B:
                print(c_max+d_max)
                break
        
            if i == len(cc)-1 and n == len(dd)-1:
                print((c_max+d_max)-1)

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

if n % x !=0:
    a = ((n // x)+1) * t 
else:
    a=(n//x)*t
print(a)
Buggy python submission (verdict: Runtime Error):
N =int(input())
S =N
count = 1
t = 13
for i in range(t):
    if S > 26**(t-i):
        a = S // 26**(t-i)
        S -= a*26**(t-i)
        count += 1


A=["*"]*count
#print(A)
for i in range(len(A)):
    a = N // 26**(len(A)-i-1) 
    if a ==27:
        A[i] = 26
        N-=26 * 26**(len(A)-i-1)
    else:
        A[i] = a
        N -= a * 26**(len(A)-i-1)
    
    
#print(A)
B =[]
for i in A:
    if i != "*":
        B.append(chr(96+i))
    
print("".join(B))

Fixed submission:
N = int(input())
ans=""
for i in range(1,99):
    if N <= 26**i:
        N -= 1
        for j in range(i):
            ans += chr(ord('a')+ N % 26)
            #print(N, N % 26,ans)
            N //= 26
            
        break
    else:
        N -= 26**i
    #print(N)
print(ans[::-1])
Buggy python submission (verdict: Runtime Error):
S = str(input())
if S = "ABC":
  print("ARC")
elif S = "ARC":
  print("ABC")

Fixed submission:
S = str(input())
if S == "ABC":
  print("ARC")
elif S == "ARC":
  print("ABC")
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
A = {}
ac = []
total=0
count = 0
for i in range(M):
    p, s = map(str, input().split())
    if int(p) not in ac:
        if int(p) not in A.keys(): 
            if int(p) >0 and int(p) <=N :
                if s == "WA":
                    A[int(p)] =1
                elif s =="AC":
                    A[int(p)] =0
                    ac.append(int(p))
        elif int(p) in A.keys():
            if s == "WA":
                    A[int(p)] +=1
            elif s =="AC":
                    A[int(p)] +=0
                    ac.append(int(p))
                    count += 1
                    total += A[int(p)]

print(count,total)

Fixed submission:
c = str(input())
d=int(ord(c)+1)
print(chr(d))
Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int, input().split())
A = {}
ac = []
total=0
count = 0
for i in range(M):
    p, s = map(str, input().split())
    if int(p) not in ac:
        if int(p) not in A.keys(): 
            if int(p) >0 and int(p) <=N :
                if s == "WA":
                    A[int(p)] =1
                elif s =="AC":
                    A[int(p)] =0
                    ac.append(int(p))
                    count += 1
        elif int(p) in A.keys():
            if s == "WA":
                    A[int(p)] +=1
            elif s =="AC":
                    A[int(p)] +=0
                    ac.append(int(p))
                    count += 1
                    total += A[int(p)]

print(count,total)

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 = map(str, 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 python submission (verdict: Time Limit Exceeded):
N, M = map(int, input().split())
A = {}
ac = []
for i in range(M):
    p, s = map(str, input().split())
    if int(p) not in ac:
        if int(p) not in A.keys(): 
            if int(p) >0 and int(p) <=N :
                if s == "WA":
                    A[int(p)] =1
                elif s =="AC":
                    A[int(p)] =0
                    ac.append(int(p))
        elif int(p) in A.keys():
            if s == "WA":
                    A[int(p)] +=1
            elif s =="AC":
                    A[int(p)] +=0
                    ac.append(int(p))
        
total=0
count = 0
for k,v in A.items():
    if k in ac:
        count += 1
        total += v
print(count,total)

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 = map(str, 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 python submission (verdict: Runtime Error):
A, B = map(int, input().split())
if A >= 13:
  print(B)
elif A <= 12 and A >= 6:
  print(B/2)
eiif A < 6:
  print(0) 

Fixed submission:
A, B = map(int, input().split())
if A >= 13:
	B = B
elif A <= 12 and A >= 6:
  B = B // 2
elif A < 6:
  B *= 0
print(B)
Buggy python submission (verdict: Runtime Error):
N=int(input())
ans=0
for i in range(N):
  ans+=(N-1)//i
print(ans)

Fixed submission:
N=int(input())
ans=0
for i in range(1,N):
  ans+=(N-1)//i
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

N=int(input())
A=np.array(list(map(int,input().split())))
ans=0

for i in range(N-1):
  ans+=sum(A[i]*A[i+1:])
  ans%=(1e+9+7)
print(int(ans))

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

temp=sum(A)
ans=0

for i in range(N-1):
  temp-=A[i]
  ans+=A[i]*temp

print(int(ans%(10**9+7)))
Buggy python submission (verdict: Time Limit Exceeded):
N,K=map(int,input().split())
A=list(map(int,input().split()))
temp=1

for i in range(N):
  if i<K:
    temp*=A[i]
  else:
    score=(temp//A[i-K])*A[i]
    if temp<score:
      print('Yes')
    else:
      print('No')
    temp=score

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

for i in range(K,N):
  if A[i]>A[i-K]:
      print('Yes')
  else:
      print('No')
Buggy python submission (verdict: Runtime Error):
n=int(input())
l=[26**i for i in range(1,10)]
ans=[]
for i in range(len(l)):
  if n-l[i]<=0:
    if n==l[i]:
      print('z'*(i+1))
      break
    else:
      for j in range(1,i+2):
        div,mod=divmod(n,26**(i+1-j))
        if div==0:
          ans.append(chr(ord('a')+mod-1))
        else:
          ans.append(chr(ord('a')+div-1))
          n=mod
      else:
        print(''.join(ans))
        exit()
  else:
    n-=l[i]


Fixed submission:
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N = int(read())

def main(N):
  A = [1]
  for _ in range(100):
    A.append(A[-1] * 26)
  for n in range(1, 100):
    if N > A[n]:
      N -= A[n]
      continue

    N -= 1
    ret = []
    
    for _ in range(n):
      N, r = divmod(N, 26)
      ret.append(r)
    break
  ret = [chr(ord('a') + x) for x in ret]
  return ''.join(reversed(ret))
 
print(main(N))
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

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

def func(a):
  for i in range(q):
    b,c=map(int, input().split())
    a[a==b]=c
    print(np.sum(a))

func(a)

Fixed submission:
import collections

N=int(input())
A=list(map(int,input().split()))
X=collections.Counter(A)
Q=int(input())

ans=sum(A)
for i in range(Q):
  B,C=map(int,input().split())
  ans+=(C-B)*X[B]
  print(ans)
  X[C]+=X[B]
  X[B]=0

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
from numba import njit

n=int(input())
a=np.array(list(map(int, input().split())))
q=int(input())
a_sum= np.sum(a)


@njit
def func(a,b,c,a_sum):
  count=np.count_nonzero(a==b)
  a[a==b]=c
  a_sum += count*(c-b)
  return a,a_sum
  
for i in range(q):
  b,c=map(int, input().split())
  a,a_sum=func(a,b,c,a_sum)
  print(a_sum)

Fixed submission:
import collections

N=int(input())
A=list(map(int,input().split()))
X=collections.Counter(A)
Q=int(input())

ans=sum(A)
for i in range(Q):
  B,C=map(int,input().split())
  ans+=(C-B)*X[B]
  print(ans)
  X[C]+=X[B]
  X[B]=0

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

n=int(input())
a=np.array(list(map(int, input().split())))
q=int(input())
a_sum= np.sum(a)

for i in range(q):
  b,c=map(int, input().split())
  count=np.count_nonzero(a==b)
  a[a==b]=c
  a_sum += count*(c-b)
  print(a_sum)

Fixed submission:
import collections

N=int(input())
A=list(map(int,input().split()))
X=collections.Counter(A)
Q=int(input())

ans=sum(A)
for i in range(Q):
  B,C=map(int,input().split())
  ans+=(C-B)*X[B]
  print(ans)
  X[C]+=X[B]
  X[B]=0
Buggy python submission (verdict: Runtime Error):
import numpy as np
n = int(input())
a = np.array(list(map(int, input().split())))
ans = 0
 
for i in range(n):
  temp = a[i]
  temp_list = np.array([a[:i]])
  temp_list = np.append(temp_list,a[i+1:])
  
  if np.any(temp%temp_list == 0):
    continue
  else:
    ans += 1
    
print(ans)

Fixed submission:
import sys
import numpy as np
from numba import njit

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

#@njit
def slove(A):
  count = np.zeros(10**6 + 10, np.int32)
  for x in A:
    if count[x] > 1:
      continue
    count[::x] += 1
  ret = 0
  for x in A:
    ret += count[x] == 1
  return ret

A = np.array(read().split(), np.int32)[1:]

print(slove(A))

Buggy python submission (verdict: Runtime Error):
import sys
import numpy as np
from numba as njit


@njit
def solve(A):
  count = np.zeros(10**6+10, np.int32)
  for x in A:
    if count[x] > 1:
      continue
    else:
      count[::x] += 1
  ret = 0
  for x in A:
    if count[x] == 1:
      rep += 1
  return ret


A = np.array(read().split(),np.int32)
print(solve(A))

Fixed submission:
import sys
import numpy as np
from numba import njit

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

#@njit
def slove(A):
  count = np.zeros(10**6 + 10, np.int32)
  for x in A:
    if count[x] > 1:
      continue
    count[::x] += 1
  ret = 0
  for x in A:
    ret += count[x] == 1
  return ret

A = np.array(read().split(), np.int32)[1:]

print(slove(A))

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
from numba import njit


n = int(input())
a = np.array(list(map(int, input().split())))
ans = 0

@njit
def check(ans):
  for i in range(n):
    temp = a[i]
    count = np.count_nonzero(temp%a==0)
    if count == 1:
      ans += 1
  return ans

ans = check(ans)
print(ans)

Fixed submission:
import sys
import numpy as np
from numba import njit

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

#@njit
def slove(A):
  count = np.zeros(10**6 + 10, np.int32)
  for x in A:
    if count[x] > 1:
      continue
    count[::x] += 1
  ret = 0
  for x in A:
    ret += count[x] == 1
  return ret

A = np.array(read().split(), np.int32)[1:]

print(slove(A))

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
n = int(input())
a = np.array(list(map(int, input().split())))
ans = 0

for i in range(n):
  temp = a[i]
  temp_list = np.array([a[:i]])
  temp_list = np.append(temp_list,a[i+1:])
  
  if np.any(temp%temp_list == 0):
    continue
  else:
    ans += 1
    
print(ans)

Fixed submission:
import sys
import numpy as np
from numba import njit

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

#@njit
def slove(A):
  count = np.zeros(10**6 + 10, np.int32)
  for x in A:
    if count[x] > 1:
      continue
    count[::x] += 1
  ret = 0
  for x in A:
    ret += count[x] == 1
  return ret

A = np.array(read().split(), np.int32)[1:]

print(slove(A))
Buggy python submission (verdict: Runtime Error):
num = list(input().split())

A = int(num[0])
B = int(float(num[1])*100
print(A*B//100)

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

a = int(a)
b = int(float(b)*1000)
print(int(a*b)//1000)
Buggy python submission (verdict: Runtime Error):
import sys
import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N,M,X = map(int, readline().split())
data = np.array(read().split(), np.int64)
data = data.reshape(N,-1)
C = data[:,0]
A = data[:,1:]

cost = np.zeros(1<<N, np.int64)
dability = np.zeros((1<<N, M), np.int64)

for i in range(N):
  cost[1<<i:1<<(i+1)] = cost[:1<<i] + C[i]
  ability[1<<i:1<<(i+1)] = ability[:1<<i] + A[i]
  
ok = np.all(ability >= X, axis=1)

x = cost[ok]
answer = -1 if len(x) == 0 else x.min()
print(answer)




Fixed submission:
import sys
import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N,M,X = map(int, readline().split())
data = np.array(read().split(), np.int64)
data = data.reshape(N,-1)
C = data[:,0]
A = data[:,1:]

cost = np.zeros(1<<N, np.int64)
ability = np.zeros((1<<N, M), np.int64)

for i in range(N):
  cost[1<<i:1<<(i+1)] = cost[:1<<i] + C[i]
  ability[1<<i:1<<(i+1)] = ability[:1<<i] + A[i]

ok = np.all(ability >= X, axis=1)

x = cost[ok]
answer = -1 if len(x) == 0 else x.min()
print(answer)
Buggy python submission (verdict: Runtime Error):
S = input()
if S == 'ABC':
  print('ARC')
elif S == 'ARC'):
  print('ARC')

Fixed submission:
S = input()

if S == 'ARC':
  print('ABC')
elif S == 'ABC':
  print('ARC')
Buggy python submission (verdict: Runtime Error):
import math

x = int(input())
x_pow = round(math.pow(x, 1/5))
ok = 0

for a in range(-x_pow-10, x_pow+10):
  for b in range(-x_pow-10, x_pow+10):
    if a**5 - b**5 == x:
      print(a,b)
      ok = 1
      eixt()

Fixed submission:
import math
 
x = int(input())
x_pow = round(math.pow(x, 1/5))
ok = 0
 
for a in range(-300,300):
  for b in range(-300,300):
    if a**5 - b**5 == x:
      print(a,b)
      ok = 1
      exit()