Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
=10**9+7
n,m=map(int,input().split())
A=[1 for i in range(n)]
if n!=1:
  A[1]=2
  for i in range(m):
    A[int(input())-1]=0
  
  if A[0]==0 and A[1]!=0:
    A[1]=1



  for i in range(2,n):
    if A[i]!=0:
      A[i]=(A[i-1]+A[i-2])
      A[i]%=MOD

    
  print(A[n-1])

Fixed submission:
MOD=10**9+7
n,m=map(int,input().split())
A=[1 for i in range(n)]
if n!=1:
  A[1]=2
  for i in range(m):
    A[int(input())-1]=0
  
  if A[0]==0 and A[1]!=0:
    A[1]=1



  for i in range(2,n):
    if A[i]!=0:
      A[i]=(A[i-1]+A[i-2])
      A[i]%=MOD

    
  print(A[n-1])
  
else:print(1)

Buggy python submission (verdict: Runtime Error):
MOD=10**9+7
n,m=map(int,input().split())
A=[1 for i in range(n)]
A[1]=2
for i in range(m):
  A[int(input())-1]=0
if A[0]==0:
  A[1]=1


for i in range(2,n):
  if A[i]!=0:
    A[i]=(A[i-1]+A[i-2])
    A[i]%=MOD
    
    
print(A[n-1])

Fixed submission:
MOD=10**9+7
n,m=map(int,input().split())
A=[1 for i in range(n)]
if n!=1:
  A[1]=2
  for i in range(m):
    A[int(input())-1]=0
  
  if A[0]==0 and A[1]!=0:
    A[1]=1



  for i in range(2,n):
    if A[i]!=0:
      A[i]=(A[i-1]+A[i-2])
      A[i]%=MOD

    
  print(A[n-1])
  
else:print(1)

Buggy python submission (verdict: Runtime Error):
MOD=10**9+7
n,m=map(int,input().split())
A=[1 for i in range(n)]
A[1]=2
for i in range(m):
  A[int(input())-1]=0
if A[0]==0:
  A[1]=1


for i in range(2,n):
  if A[i]!=0:
    A[i]=(A[i-1]+A[i-2])
    A[i]%=MOD
    
    
print(A)

Fixed submission:
MOD=10**9+7
n,m=map(int,input().split())
A=[1 for i in range(n)]
if n!=1:
  A[1]=2
  for i in range(m):
    A[int(input())-1]=0
  
  if A[0]==0 and A[1]!=0:
    A[1]=1



  for i in range(2,n):
    if A[i]!=0:
      A[i]=(A[i-1]+A[i-2])
      A[i]%=MOD

    
  print(A[n-1])
  
else:print(1)

Buggy python submission (verdict: Runtime Error):
MOD=1000000007
n,m=map(int,input().split())
A=[1 for i in range(n)]
A[1]=2
for i in range(m):
  A[int(input())-1]=0
  


for i in range(2,n):
  if A[i]!=0:
    A[i]=(A[i-1]+A[i-2])%MOD
    
    
print(A[n-1])

Fixed submission:
MOD=10**9+7
n,m=map(int,input().split())
A=[1 for i in range(n)]
if n!=1:
  A[1]=2
  for i in range(m):
    A[int(input())-1]=0
  
  if A[0]==0 and A[1]!=0:
    A[1]=1



  for i in range(2,n):
    if A[i]!=0:
      A[i]=(A[i-1]+A[i-2])
      A[i]%=MOD

    
  print(A[n-1])
  
else:print(1)
Buggy python submission (verdict: Runtime Error):
r,d,x=int(input().split())

for i in range(11):
  x= x*r-d
  print(x)

Fixed submission:
r,d,x=map(int,input().split())

for i in range(10):
  x= x*r-d
  print(x)
Buggy python submission (verdict: Runtime Error):
s=int(input())
x=s//100
y=s-x*100

if x*y=0:
  print("NA")

else:
  if x<13:
    if y<13:
      print("AMBIGUOUS")
    else:
      print("MMYY")
     
  else:
    if y<13:
      print("YYMM")
    else:
      print("NA")

Fixed submission:
s=int(input())
x=s//100
y=s-x*100




if x>0 and x<13:
  if y>0 and y<13:
    print("AMBIGUOUS")
  else:
    print("MMYY")
     
else:
  if y>0 and y<13:
    print("YYMM")
  else:
    print("NA")
Buggy python submission (verdict: Runtime Error):
for i in range(5):
  L[i]=int(input())
  
k=int(input())

for i in range(4):
  if L[i+1]-L[i]>k:
    print(':(')
    break
  
  if i==3:
    print(Yay!)
  

Fixed submission:
import sys
L=[0 for i in range(5)]
for i in range(5):
  L[i]=int(input())
  
k=int(input())

for i in range(4):
  for j in range(i+1,5):
    if L[j]-L[i]>k:
      print(':(')
      sys.exit()
  
    if i==2 and j==3:
      print('Yay!')

Buggy python submission (verdict: Runtime Error):
for i in range(5):
  L[i]=int(input())
  
k=int(input())

for i in range(4):
  if L[i+1]-L[i]>k:
    print(':(')
    break
  
  if i=3:
    print(Yay!)
  

Fixed submission:
import sys
L=[0 for i in range(5)]
for i in range(5):
  L[i]=int(input())
  
k=int(input())

for i in range(4):
  for j in range(i+1,5):
    if L[j]-L[i]>k:
      print(':(')
      sys.exit()
  
    if i==2 and j==3:
      print('Yay!')
Buggy python submission (verdict: Runtime Error):
s=input()

if s='A':
  print('T')
elif s='T':
  print('A')
elif s='G':
  print('C')
else:
  print('G')
        

Fixed submission:
s=input()
 
if s=='A':
  print('T')
elif s=='T':
  print('A')
elif s=='G':
  print('C')
else:
  print('G')
Buggy python submission (verdict: Runtime Error):
a,b,k=map(int,input().split())

for i in range(1,min(a,b)+1):
  if a%i==0 and b%i==0:
    count+=1
    if count==k:
      print(i)

Fixed submission:
import sys
a,b,k=map(int,input().split())
count=0
for i in reversed(range(1,min(a,b)+1)):
  if a%i==0 and b%i==0:
    count+=1
    if count==k:
      print(i)
      sys.exit()

Buggy python submission (verdict: Runtime Error):
a,b,k=map(int,input().split())

for i in range(1,min(a,b)+1):
  if a%i==0 and b%i==0:
    count+=1
    if count=k:
      print(i)

Fixed submission:
import sys
a,b,k=map(int,input().split())
count=0
for i in reversed(range(1,min(a,b)+1)):
  if a%i==0 and b%i==0:
    count+=1
    if count==k:
      print(i)
      sys.exit()
Buggy python submission (verdict: Runtime Error):
s=input()
l=len(s)
a=[0 for i in range(l)]

for i in range(l):
  a[i]=int(s[i])
  
ichi=0
zero=0

for i in range(l):
  if a[i]==1:
    ichi+=1
  else:
    zero+=1
    
print(2*min(ichi.zero))

Fixed submission:
s=input()
l=len(s)
a=[0 for i in range(l)]

for i in range(l):
  a[i]=int(s[i])
  
ichi=0
zero=0

for i in range(l):
  if a[i]==1:
    ichi+=1
  else:
    zero+=1
    
print(2*min(ichi,zero))
Buggy python submission (verdict: Runtime Error):
s=input()s=input()

if int(s[1])>4:
  print('TBD')
elif int(s[0])==1:
  print('TBD')
else:
  print('Heisei')
  
  

Fixed submission:
s=input()

if int(s[6])>4:
  print('TBD')
elif int(s[5])==1:
  print('TBD')
else:
  print('Heisei')
Buggy python submission (verdict: Runtime Error):
s=input()
if D==25:
  print('Christmas')

if D==24:
  print('Christmas Eve')
if D==25:
  print('Christmas Eve Eve')

if D==25:
  print('Christmas Eve Eve Eve')


Fixed submission:
D=int(input())
if D==25:
  print('Christmas')

if D==24:
  print('Christmas Eve')
  
if D==23:
  print('Christmas Eve Eve')

if D==22:
  print('Christmas Eve Eve Eve')
Buggy python submission (verdict: Runtime Error):
x=int(input())
if x=3 or x=5 or x=7:
  print('YES')
else:
  print('NO')

Fixed submission:
x=int(input())
if x==3 or x==5 or x==7:
  print('YES')
else:
  print('NO')
Buggy python submission (verdict: Runtime Error):
a=int(input())
a//2=c
if a%2==0:
  print(c**2)
else:
  print(c*(c+1))

Fixed submission:
a=int(input())
c=a//2
if a%2==0:
  print(c**2)
else:
  print(c*(c+1))
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
M=0
for i in range(N-1):
  M+=(i+1)
print(M)

Fixed submission:
N=int(input())
if (N-1)%2==0 :
  print(N*((N-1)//2))
else :
  print(N*((N-1)//2)+N//2)
Buggy python submission (verdict: Time Limit Exceeded):
N,M=map(int,input().split())
S=set()
for i in range(N):
  S.add(i+1)
for i in range(M):
  L,R=map(int,input().split())
  T=set()
  for i in range(L,R+1):
    T.add(i)
  S=S&T
print(len(S))


Fixed submission:
N,M=map(int,input().split())
L=1
R=100000
for i in range(M):
  l,r=map(int,input().split())
  L=max(L,l)
  R=min(r,R)
if L>R :
  print(0)
else :
  print(R-L+1)
Buggy python submission (verdict: Runtime Error):
L=[]
M=[]
for i in range(5) :
  A=int(input())
  L.append(A)
  if A%10!=0 :
    M.append(10-A%10)
print(sum(L+M)-max(M))

Fixed submission:
from math import ceil 
L=[]
X=0
M=int(input())
L.append(M)
for i in range(4) :
  A=int(input())
  L.append(A)
  if A%10 < M%10 and A%10!=0 :
    M=A
L.remove(M)
for i in L :
  X+=ceil(i/10)*10
print(X+M)

Buggy python submission (verdict: Runtime Error):
from math import ceil 
L=[]
M=9
X=0
for i in range(5) :
  A=int(input())
  L.append(A)
  if A%10 < M%10 and A%10!=0 :
    M=A
L.remove(M)
for i in L :
  X+=ceil(i/10)*10
print(X+M)

Fixed submission:
from math import ceil 
L=[]
X=0
M=int(input())
L.append(M)
for i in range(4) :
  A=int(input())
  L.append(A)
  if A%10 < M%10 and A%10!=0 :
    M=A
L.remove(M)
for i in L :
  X+=ceil(i/10)*10
print(X+M)
Buggy python submission (verdict: Runtime Error):
S=set(["A","C","G","T"])
L=list(input())
A=[]
M=0
for i in L :
  if i in S :
    M+=1
  else :
    A.append(M)
    M=0
print(max(A))

Fixed submission:
S=set(["A","C","G","T"])
L=list(input())
A=[]
M=0
for i in L :
  if i in S :
    M+=1
  else :
    A.append(M)
    M=0
A.append(M)
print(max(A))
Buggy python submission (verdict: Runtime Error):
A=int(input())
B=int(input())
if B%A==0 :
    print(A+B)
else:
    print(B-A)

Fixed submission:
A,B=input().split()
A=int(A)
B=int(B)
if B%A==0:
    print(A+B)
else :
    print(B-A)
Buggy python submission (verdict: Runtime Error):
N=int(input())
for i in range(26) :
  if N=>4 and (N-(4*i))%7==0 :
    print("Yes")
    break
else :
  print("No")

Fixed submission:
N=int(input())
for i in range(26) :
  if  N >= 4*i and (N-(4*i))%7==0 :
    print("Yes")
    break
else :
  print("No")
Buggy python submission (verdict: Time Limit Exceeded):
A,B,K=map(int,input().split())
for i in range(A,B+1) :
  if i < A+K or B-K < i :
    print(i)

Fixed submission:
A,B,K=map(int,input().split())
if B-A < K :
  for i in range(A,B+1) :
    if i < A+K or B-K < i :
      print(i)
else :
  S=set()
  for i in range(K) :
    S.add(A+i)
    S.add(B-i)
  L=list(S)
  L.sort() 
  for i in L :
    print(i)
Buggy python submission (verdict: Runtime Error):
print(input()).count("1")

Fixed submission:
A=list(input())
print(eval("+".join(A)))
Buggy python submission (verdict: Time Limit Exceeded):
n, m, l = map(int, input().split())
mw =[[float('inf')] * n for _ in range(n)]
for _ in range(m):
    a, b, c = map(int, input().split())
    mw[a-1][b-1] = c
    mw[b-1][a-1] = c

def warshall_floyd(d): # d: 隣接行列
    for k in range(n):
        for i in range(n):
            for j in range(n):
                d[i][j] = min(d[i][j], d[i][k] + d[k][j])
    return d

d = warshall_floyd(mw)
mw =[[float('inf')] * n for _ in range(n)]
for i in range(n):
    for j in range(n):
        if d[i][j] <= l:
            mw[i][j] = 1
dd = warshall_floyd(mw)

q = int(input())
for _ in range(q):
    s, t = map(int, input().split())
    ans = dd[s-1][t-1]-1
    if ans > 10 ** 10:
        print(-1)
    else:
        print(ans)

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

n, m, l = map(int, input().split())
mw =[[float('inf')] * n for _ in range(n)]
for _ in range(m):
    a, b, c = map(int, input().split())
    mw[a-1][b-1] = c
    mw[b-1][a-1] = c

def warshall_floyd(d): # d: 隣接行列
    for k in range(n):
        for i in range(n):
            for j in range(n):
                d[i][j] = min(d[i][j], d[i][k] + d[k][j])
    return d

d = warshall_floyd(mw)
mw =[[float('inf')] * n for _ in range(n)]
for i in range(n):
    for j in range(n):
        if d[i][j] <= l:
            mw[i][j] = 1
dd = warshall_floyd(mw)

q = int(input())
for _ in range(q):
    s, t = map(int, input().split())
    ans = dd[s-1][t-1]-1
    if ans > 10 ** 10:
        print(-1)
    else:
        print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n, m, l = map(int, input().split())
mw =[[float('inf')] * n for _ in range(n)]
for _ in range(m):
    a, b, c = map(int, input().split())
    mw[a-1][b-1] = c
    mw[b-1][a-1] = c

def warshall_floyd(d): # d: 隣接行列
    for k in range(n):
        for i in range(n):
            for j in range(n):
                d[i][j] = min(d[i][j], d[i][k] + d[k][j])
    return d

d = warshall_floyd(mw)
mw =[[float('inf')] * n for _ in range(n)]
for i in range(n):
    for j in range(n):
        if d[i][j] <= l:
            mw[i][j] = 1
dd = warshall_floyd(mw)

q = int(input())
for _ in range(q):
    s, t = map(int, input().split())
    ans = dd[s-1][t-1]-1
    if ans > 10 ** 10:
        print(-1)
    else:
        print(ans)

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

n, m, l = map(int, input().split())
mw =[[float('inf')] * n for _ in range(n)]
for _ in range(m):
    a, b, c = map(int, input().split())
    mw[a-1][b-1] = c
    mw[b-1][a-1] = c

def warshall_floyd(d): # d: 隣接行列
    for k in range(n):
        for i in range(n):
            for j in range(n):
                d[i][j] = min(d[i][j], d[i][k] + d[k][j])
    return d

d = warshall_floyd(mw)
mw =[[float('inf')] * n for _ in range(n)]
for i in range(n):
    for j in range(n):
        if d[i][j] <= l:
            mw[i][j] = 1
dd = warshall_floyd(mw)

q = int(input())
for _ in range(q):
    s, t = map(int, input().split())
    ans = dd[s-1][t-1]-1
    if ans > 10 ** 10:
        print(-1)
    else:
        print(ans)
Buggy python submission (verdict: Runtime Error):
# from fractions import gcd
from math import gcd

def primes(n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if is_prime[i]]

a, b = map(int, input().split())
p = primes(10 ** 6 +1)
ans = 1
g = gcd(a, b)
for pp in p:
    f = False
    while g % pp == 0:
        g = (g // pp)
        f = True
    if f:
        ans += 1
if g > 1:
    ans += 1
print(ans)

Fixed submission:
from fractions import gcd
# from math import gcd

def primes(n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if is_prime[i]]

a, b = map(int, input().split())
p = primes(10 ** 6 +1)
ans = 1
g = gcd(a, b)
for pp in p:
    f = False
    while g % pp == 0:
        g = (g // pp)
        f = True
    if f:
        ans += 1
if g > 1:
    ans += 1
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = input()
x = []
for i in range(n):
    x.append(s[i:])

x.sort()

ans = 0
for i in range(n):
    for j in range(i+1, n):
        y = x[i]
        z = x[j]
        m = min(len(y), len(z), abs(len(y) - len(z)))
        tmp = 0
        for k in range(m):
            if y[k] == z[k]:
                tmp += 1
        if ans < tmp:
            ans = tmp
print(ans)

Fixed submission:
n = int(input())
s = input()

dp = [ [0] * (n+1) for _ in range(n+1)]

for i in range(n-1, -1, -1):
    for j in range(n-1, -1, -1):
        if s[i] == s[j]:
            dp[i][j] = dp[i+1][j+1] + 1
        else:
            dp[i][j] = 0

ans = 0
for i in range(n):
    for j in range(n):
        tmp = min(dp[i][j], abs(i-j))
        if ans < tmp:
            ans = tmp
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
from collections import defaultdict
n = int(input())
a = [[]]
for _ in range(n):
    tmp = [int(x) for x in input().split()]
    a.append(tmp[::-1])

p = [i for i in range(1, n+1)]
c = defaultdict(int)
done = 0
for d in range(1, n*(n-1)//2+1):
    np = []
    for pp in p:
        if len(a[pp]) == 0:
            continue
        x = a[pp].pop()
        l = min(x, pp)
        r = max(x, pp)
        c[l, r] += 1
        if c[l, r] == 2:
            np.append(l)
            np.append(r)
            done += 1
    if done == (n*(n-1)//2):
        print(d)
        exit()
    if len(np) == 0:
        print(-1)
        exit()
    p = np

Fixed submission:
from collections import defaultdict
n = int(input())
a = [[]]
for _ in range(n):
    tmp = [int(x) for x in input().split()]
    a.append(tmp[::-1])

p = [i for i in range(1, n+1)]
c = defaultdict(int)
done = 0
for d in range(1, n*(n-1)//2+1):
    np = []
    for pp in p:
        if len(a[pp]) == 0:
            continue
        x = a[pp].pop()
        l = min(x, pp)
        r = max(x, pp)
        c[l, r] += 1
        if c[l, r] == 2:
            np.append(l)
            np.append(r)
            done += 1
    if done == (n*(n-1)//2):
        print(d)
        exit()
    if len(np) == 0:
        print(-1)
        exit()
    p = np
Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline

n, q = map(int, input().split())
p = []
x = [0] * (n+1)
for _ in range(n-1):
    p.append(list(map(int, input().split())))

for _ in range(q):
    tmp1, tmp2 = map(int, input().split())
    x[tmp1] += tmp2

# 隣接リスト
l = [[] for _ in range(n+1)]
for pi in p:
    l[pi[0]].append(pi[1])
    l[pi[1]].append(pi[0])
p = [0] * (n+1)

import sys
sys.setrecursionlimit(100000)


def dfs(n, v, par):
    p[n] = v
    for chl in l[n]:
        if chl == par:
            continue  # parent
        dfs(chl, v+x[chl], n)
    return

dfs(1, x[1], 0)
print(*p[1:])

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

n, q = map(int, input().split())
p = []
x = [0] * (n+1)
for _ in range(n-1):
    p.append(list(map(int, input().split())))

for _ in range(q):
    tmp1, tmp2 = map(int, input().split())
    x[tmp1] += tmp2

# 隣接リスト
l = [[] for _ in range(n+1)]
for pi in p:
    l[pi[0]].append(pi[1])
    l[pi[1]].append(pi[0])
p = [0] * (n+1)

import sys
sys.setrecursionlimit(10000000)


def dfs(n, v, par):
    p[n] = v
    for chl in l[n]:
        if chl == par:
            continue  # parent
        dfs(chl, v+x[chl], n)
    return

dfs(1, x[1], 0)
print(*p[1:])

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

n, q = map(int, input().split())
p = []
x = [0] * (n+1)
for _ in range(n-1):
    p.append(list(map(int, input().split())))

for _ in range(q):
    tmp1, tmp2 = map(int, input().split())
    x[tmp1] += tmp2

# 隣接リスト
l = [[] for _ in range(n+1)]
for pi in p:
    l[pi[0]].append(pi[1])
    l[pi[1]].append(pi[0])
p = [0] * (n+1)

import sys
sys.setrecursionlimit(100000)


def dfs(n, v, par):
    p[n] = v
    for chl in l[n]:
        if chl == par:
            continue  # parent
        dfs(chl, v+x[chl], n)
    return

dfs(1, x[1], 0)
print(*p[1:])

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

n, q = map(int, input().split())
p = []
x = [0] * (n+1)
for _ in range(n-1):
    p.append(list(map(int, input().split())))

for _ in range(q):
    tmp1, tmp2 = map(int, input().split())
    x[tmp1] += tmp2

# 隣接リスト
l = [[] for _ in range(n+1)]
for pi in p:
    l[pi[0]].append(pi[1])
    l[pi[1]].append(pi[0])
p = [0] * (n+1)

import sys
sys.setrecursionlimit(10000000)


def dfs(n, v, par):
    p[n] = v
    for chl in l[n]:
        if chl == par:
            continue  # parent
        dfs(chl, v+x[chl], n)
    return

dfs(1, x[1], 0)
print(*p[1:])
Buggy python submission (verdict: Time Limit Exceeded):
from scipy.sparse import lil_matrix, csr_matrix
import numpy as np

s = input()
n = len(s)
a = lil_matrix((n,n), dtype=int)

for i in range(n):
    if s[i] == 'R':
        a[i+1, i] = 1
    else:
        a[i-1, i] = 1
a = a.tocsr()
a10 = a
for i in range(9):
    a10 = a.dot(a10)
a10_10 = a10
for _ in range(9):
    a10_10 = a10.dot(a10_10)
a10_10_10 = a10_10
for _ in range(9):
    a10_10_10 = a10_10.dot(a10_10_10)


v = np.ones(n, dtype=int)
vv = a10_10_10.dot(v)
ans = vv.tolist()
print(*ans)

Fixed submission:
s = input()
ss = []

tmp = ''
for i in range(len(s)-1):
    tmp += s[i]
    if s[i] == 'L' and s[i+1] == 'R':
        ss.append(tmp)
        tmp = ''
ss.append(tmp+'L')

ans = []
for sss in ss:
    l = len(sss)
    for i in range(l):
        if sss[i] == 'R' and sss[i+1] == 'L':
            ri = i
            break
    rn = ri//2 + 1 + (l-ri-1)//2
    ln = l-rn
    for i in range(l):
        if i == ri:
            ans.append(rn)
        elif i == (ri+1):
            ans.append(ln)
        else:
            ans.append(0)
print(*ans)

Buggy python submission (verdict: Time Limit Exceeded):
from scipy.sparse import lil_matrix, csr_matrix
import numpy as np

s = input()
n = len(s)
a = lil_matrix((n,n))

for i in range(n):
    if s[i] == 'R':
        a[i+1, i] = 1
    else:
        a[i-1, i] = 1
a = a.tocsr()
a10 = a
for i in range(9):
    a10 = a.dot(a10)
a10_100 = a10
for _ in range(99):
    a10_100 = a10.dot(a10_100)

v = np.ones(n)
vv = a10_100.dot(v)
ans = [int(x) for x in vv]
print(*ans)

Fixed submission:
s = input()
ss = []

tmp = ''
for i in range(len(s)-1):
    tmp += s[i]
    if s[i] == 'L' and s[i+1] == 'R':
        ss.append(tmp)
        tmp = ''
ss.append(tmp+'L')

ans = []
for sss in ss:
    l = len(sss)
    for i in range(l):
        if sss[i] == 'R' and sss[i+1] == 'L':
            ri = i
            break
    rn = ri//2 + 1 + (l-ri-1)//2
    ln = l-rn
    for i in range(l):
        if i == ri:
            ans.append(rn)
        elif i == (ri+1):
            ans.append(ln)
        else:
            ans.append(0)
print(*ans)
Buggy python submission (verdict: Runtime Error):
N, X = map(int, input().split())
L = list(map(int, input().split()))
a = 0
for i in range(N+1):
    a += L[i]
    if a > X:
        break
print(i+1)

Fixed submission:
N, X = map(int, input().split())
L = list(map(int, input().split()))
a = 0
ans = 1
for i in range(N):
    a += L[i]
    if a <= X:
        ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline

N, M = map(int, input().split())
a = [int(input()) for _ in range(M)]
base = 1_000_000_007

x = [0] * (N+1)
x[0] = 1
ai = 0
if ai >= M or 1 != a[ai]:
    x[1] = x[0]
else:
    ai += 1
for i in range(2, (N+1)):
    if ai >= M or i != a[ai]:
        x[i] = (x[i-1] + x[i-2]) % base
    else:
        ai += 1
print(x[N])

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

N, M = map(int, input().split())
a = [int(input()) for _ in range(M)]
base = 1000000007

x = [0] * (N+1)
x[0] = 1
ai = 0
if ai >= M or 1 != a[ai]:
    x[1] = x[0]
else:
    ai += 1
for i in range(2, (N+1)):
    if ai >= M or i != a[ai]:
        x[i] = (x[i-1] + x[i-2]) % base
    else:
        ai += 1
print(x[N])