Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N=int(input())
chars="Xabcdefghijklmnopqrstuvwxyz")
res=""
n_rem=N
while True:
  x=n_rem%26
  if x==0:
    x=26
  res+=chars[x]
  n_rem-=x
  if n_rem==0:
    break
  n_rem//=26
print(res[::-1])
  
    

Fixed submission:
n = int(input())
chars = "Xabcdefghijklmnopqrstuvwxyz"  # x番目がほしいときにchars[x-1]としたくないので、chars[0]は使わないことにします

n_rem = n  # 入力を直接操作すると、もし後々必要になったときに面倒なので
res = ""

while True:
    x = n_rem % 26
    # 余りが0、つまりzの場合は、26にします
    if x == 0:
        x = 26
    res += chars[x]

    # xを引いて、26で割ります
    n_rem -= x

    # 0なら終了します
    if n_rem == 0:
        break

    n_rem //= 26

# 0桁目が先頭で、最後の桁が末尾になっているので、反転させます
print(res[::-1])

Buggy python submission (verdict: Runtime Error):
N=int(input())
chars="Xabcdefghijklmnopqrstuvwxyz")
N_rem=N
res=""
while True:
  x=N_rem%26
  if x==0:
    x=26
  res+=chars[x]
  N_rem-=x
  if N-rem==0:
    break
  N_rem//=26
print(res[::-1])
  

Fixed submission:
n = int(input())
chars = "Xabcdefghijklmnopqrstuvwxyz"  # x番目がほしいときにchars[x-1]としたくないので、chars[0]は使わないことにします

n_rem = n  # 入力を直接操作すると、もし後々必要になったときに面倒なので
res = ""

while True:
    x = n_rem % 26
    # 余りが0、つまりzの場合は、26にします
    if x == 0:
        x = 26
    res += chars[x]

    # xを引いて、26で割ります
    n_rem -= x

    # 0なら終了します
    if n_rem == 0:
        break

    n_rem //= 26

# 0桁目が先頭で、最後の桁が末尾になっているので、反転させます
print(res[::-1])
Buggy python submission (verdict: Runtime Error):
form collections import Counter
N=int(input())
A=list(map(int,input().split()))
Q=int(input())
counter=Counter(A)
sum_res=sum(A)
for i in range(Q):
  b,c=map(int,input().split())
  sum_res-=counter[b]*b
  sum_res+=counter[b]*c
  counter[c]+=counter[b]
  counter[b]=0
  print(sum_res)

Fixed submission:
from collections import Counter
N=int(input())
A=list(map(int,input().split()))
Q=int(input())
counter=Counter(A)
sum_res=sum(A)
for i in range(Q):
  b,c=map(int,input().split())
  sum_res-=counter[b]*b
  sum_res+=counter[b]*c
  counter[c]+=counter[b]
  counter[b]=0
  print(sum_res)
Buggy python submission (verdict: Runtime Error):
N,M=map(int,input().split())
H=list(map(int,input().split()))
a=[0]*N #H[i]と接する高さの最大値
for i in range(M):
  A,B=map(int,input().split())
  a[A-1]=max(a{A-1],H[B-1])
  a[B-1]=max(a[B-1],H[A-1])
s=0
for i in range(M):
  if H[i]>A[i]:
    s+=1
print(s)
  

Fixed submission:
N,M=map(int,input().split())
H=list(map(int,input().split()))
A=[0]*N
for i in range(M):
  a,b=list(map(int,input().split()))
  A[a-1]=max(A[a-1],H[b-1])
  A[b-1]=max(A[b-1],H[a-1])
s=0
for i in  range(N):
  if H[i]>A[i]:
    s+=1
print(s)
Buggy python submission (verdict: Runtime Error):
import math
A,B,N=map(int,input().split())
s=math.floor((A*(B-1))/B))
t=math.floor((A*N)/B))
print(max(s,t))

Fixed submission:
import math
A,B,N=map(int,input().split())
s=math.floor((A*(B-1))/B)
t=math.floor((A*N)/B)
print(min(s,t))

Buggy python submission (verdict: Runtime Error):
A,B,N=map(int,input().split())
s=math.floor((A*(B-1))/B))
t=math.floor((A*N)/B))
print(max(s,t))

Fixed submission:
import math
A,B,N=map(int,input().split())
s=math.floor((A*(B-1))/B)
t=math.floor((A*N)/B)
print(min(s,t))
Buggy python submission (verdict: Time Limit Exceeded):
import math
from functools import reduce
def gcd(*numbers):
  return reduce(math.gcd,numbers)
K=int(input())
s=0
for a in range(1,K+1):
  for b in range(1,K+1):
    for c in range(1,K+1):
      s+=gcd(a,b,c)
print(s)
    

Fixed submission:
import math
K=int(input())
ans=0
for a in range(1,K+1):
  for b in range(1,K+1):
    ans_=math.gcd(a,b)
    for c in range(1,K+1):
      ans+=math.gcd(ans_,c)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import math 
from itertools import product
from functools import reduce
def gcd(*numbers):
  return reduce(math.gcd,numbers)
K=int(input())
A=[]
a_s=range(1,K+1)
b_s=range(1,K+1)
c_s=range(1,K+1)
for a,b,c in product(a_s,b_s,c_s):
  s=gcd(a,b,c)
  A.append(s)
print(sum(A))

Fixed submission:
import math
K=int(input())
ans=0
for a in range(1,K+1):
  for b in range(1,K+1):
    ans_=math.gcd(a,b)
    for c in range(1,K+1):
      ans+=math.gcd(ans_,c)
print(ans)

Buggy python submission (verdict: Runtime Error):
import math 
from itertools import product
from functools import reduce
def gcd(*numbers):
  return reduce(math.gcd,numbers)
K=int(input())
A=[]
as=range(1,K+1)
bs=range(1,K+1)
cs=range(1,K+1)
for a,b,c in product(as,bs,cs):
  s=gcd(a,b,c)
  A.append(s)
print(sum(A))
  
    
      A.append(s)
print(sum(A))

Fixed submission:
import math
K=int(input())
ans=0
for a in range(1,K+1):
  for b in range(1,K+1):
    ans_=math.gcd(a,b)
    for c in range(1,K+1):
      ans+=math.gcd(ans_,c)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import math 
from functools import reduce
def gcd(*numbers):
  return reduce(math.gcd,numbers)
K=int(input())
A=[]
for i in range(1,K+1):
  for j in range(1,K+1):
    for k in range(1,K+1):
      s=gcd(i,j,k)
      A.append(s)
print(sum(A))

Fixed submission:
import math
K=int(input())
ans=0
for a in range(1,K+1):
  for b in range(1,K+1):
    ans_=math.gcd(a,b)
    for c in range(1,K+1):
      ans+=math.gcd(ans_,c)
print(ans)

Buggy python submission (verdict: Runtime Error):
import math 
K=int(input())
A=[]
for i in range(K):
  for j in range(K):
    for k in range(K):
      s=gcd(i,j,k)
      A.append(s)
print(sum(A)


Fixed submission:
import math
K=int(input())
ans=0
for a in range(1,K+1):
  for b in range(1,K+1):
    ans_=math.gcd(a,b)
    for c in range(1,K+1):
      ans+=math.gcd(ans_,c)
print(ans)
Buggy python submission (verdict: Runtime Error):
import collections
N=int(input())
S=list(input())
s=collections.Counter(S)
m=s["R"]*s["G"]*s["B"]
s=0
for i in range(1,N-1):
  for j in range(i,N):
    k=2*j-i
    if S[i]!=S[j] and S[i]!=S[k] and S[j]!=S[k]:
      s+=1
print(m-s)

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

R = 0
G = 0
B = 0

for i in range(N):
	if S[i] == 'R':
		R += 1
	elif S[i] == 'G':
		G += 1
	else:
		B += 1
ans = R * G * B
for i in range(N - 2):
	for j in range(i + 1, N - 1):
		k = j + (j - i)
		if k >= N:
			break
		if S[i] != S[j] and S[i] != S[k] and S[j] != S[k]:
			ans -= 1
print(ans)
Buggy python submission (verdict: Runtime Error):
import collections 
N=int(input())
A=list(map(int,input().split()))
s=0
cnt=collections.Counter(A)
for key in cnt.keys():
  s+=(cnt[key]*(cnt[key]-1))//2
for i in range(N):
  tmp=s
  tmp-=cnt(A[i])*(cnt(A[i])-1)//2
  tmp+=(cnt(A[i])-1)*(cnt(A[i])-2)//2
  print(tmp)
  
    

Fixed submission:
import collections 
N=int(input())
A=list(map(int,input().split()))
s=0
cnt=collections.Counter(A)
for key in cnt.keys():
  s+=(cnt[key]*(cnt[key]-1))//2
for i in range(N):
  tmp=s
  tmp-=cnt[A[i]]*(cnt[A[i]]-1)//2
  tmp+=(cnt[A[i]]-1)*(cnt[A[i]]-2)//2
  print(tmp)
Buggy python submission (verdict: Runtime Error):
A,B=map(int,input().split())
j=A*12.5
k=(A+1)*12.5
l=B*12.5
m=(B+1)*12.5
N=[]
O=[]
for i in range(j,k+1):
  N.append(i)
for h in range(l,m+1):
  O.append(h)
N_set=set(N)
O_set=set(O)
matched_list=list(N_set&O_set)
print(min(matched_list))

Fixed submission:
import math
A,B=map(int,input().split())
C=[]
for i in range(1,1010):
  if math.floor(i*0.08)==A and math.floor(i*0.1)==B:
    C.append(i)
if len(C)==0:
  print("-1")
else:
  print(min(C))
Buggy python submission (verdict: Runtime Error):
N=int(input())
A=list(map(int,input().split()))
s=0
for i in range(N-1):
  for j in range(i+1,N):
    if all(A[i]!=A[j]):
      print("YES")
    else:
      print("NO")

Fixed submission:
N=int(input())
A=map(int,input().split())
n=len(set(A))
if N!=n:
  print("NO")
else:
  print("YES")

Buggy python submission (verdict: Runtime Error):
N=int(input())
A=list(map(int,input().split()))
s=0
for i in range(N-1):
  for j in range(i+1,N):
if all(A[i]!=A[j]):
  print("YES")
else:
  print("NO")

Fixed submission:
N=int(input())
A=map(int,input().split())
n=len(set(A))
if N!=n:
  print("NO")
else:
  print("YES")

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=list(map(int,input().split()))
s=0
for i in range(N-1):
  for j in range(i+1,N):
    if A[i]!=A[j]:
      s=s
    else:
      s+=1
if s!=0:
  print("NO")
else:
  print("YES")

Fixed submission:
N=int(input())
A=map(int,input().split())
n=len(set(A))
if N!=n:
  print("NO")
else:
  print("YES")
Buggy python submission (verdict: Runtime Error):
N,K=map(int,input().split())
H=list(map(int,input().split()))
H.sort(reverse=True)
H.remove(H[0:K])
print(sum(H[K:]))

Fixed submission:
N,K=map(int,input().split())
H=list(map(int,input().split()))
H.sort(reverse=True)
print(sum(H[K:]))

Buggy python submission (verdict: Runtime Error):
N,K=map(int,input().split())
H=list(map(int,input().split()))
H.sort(reverse=True)
for i in range(K):
  H.remove(H[i])
print(sum(H[K:]))

Fixed submission:
N,K=map(int,input().split())
H=list(map(int,input().split()))
H.sort(reverse=True)
print(sum(H[K:]))

Buggy python submission (verdict: Runtime Error):
N,K=map(int,input().split())
H=list(map(int,input().split()))
H.sort(reverse=True)
H.remove(H[0:K])
print(sum(H[K:]))

Fixed submission:
N,K=map(int,input().split())
H=list(map(int,input().split()))
H.sort(reverse=True)
print(sum(H[K:]))

Buggy python submission (verdict: Runtime Error):
N,K=map(int,input().split())
H=list(map(int,input().split()))
T=H.sort(reverse=True)
T.remove(T[0:K])
print(K+sum(T[K:]))

Fixed submission:
N,K=map(int,input().split())
H=list(map(int,input().split()))
H.sort(reverse=True)
print(sum(H[K:]))

Buggy python submission (verdict: Runtime Error):
N,K=map(int,input().split())
H=list(map(int,input().split()))
H.sort(reverse=True)
H.remove(H[0:K])
print(K+sum(H[K:]))

Fixed submission:
N,K=map(int,input().split())
H=list(map(int,input().split()))
H.sort(reverse=True)
print(sum(H[K:]))

Buggy python submission (verdict: Runtime Error):
N,K=map(int,input().split())
H=list(map(int,input().split()))
H.sort(reverse=True)
for i in range(K):
  H.remove(H[i])
print(K+sum(H[K:]))

Fixed submission:
N,K=map(int,input().split())
H=list(map(int,input().split()))
H.sort(reverse=True)
print(sum(H[K:]))

Buggy python submission (verdict: Runtime Error):
N,K=map(int,input().split())
H=list(map(int,input().split()))
H.sort(reverse=True)
for i in range(K):
  H.remove(H[i])
print(K+sum(H[K::]))


Fixed submission:
N,K=map(int,input().split())
H=list(map(int,input().split()))
H.sort(reverse=True)
print(sum(H[K:]))
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
P=list(map(int,input().split()))
s=1
for i in range(1,N):
  if P[i]<=min(P[0:i]):
    s+=1
print(s)

Fixed submission:
N=int(input())
P=list(map(int,input().split()))
s=1
m=P[0]
for i in range(1,N):
  if P[i]<=m:
    m=P[i]
    s+=1
print(s)

Buggy python submission (verdict: Runtime Error):
N=int(input())
P=list(map(int,input().split()))
s=1
for i in range(1,N):
  if P[i]==min(P[0:i+1])
    s+=1
print(s)

Fixed submission:
N=int(input())
P=list(map(int,input().split()))
s=1
m=P[0]
for i in range(1,N):
  if P[i]<=m:
    m=P[i]
    s+=1
print(s)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
P=list(map(int,input().split()))
s=1
for i in range(1,N):
  if P[i]<=min(P[0:i]):
    s+=1
print(s)

Fixed submission:
N=int(input())
P=list(map(int,input().split()))
s=1
m=P[0]
for i in range(1,N):
  if P[i]<=m:
    m=P[i]
    s+=1
print(s)

Buggy python submission (verdict: Runtime Error):
N=int(input())
P=list(map(int,input().split()))
s=0
for i in range(N):
  if P[i]<=min(P[0:i]):
    s+=1
print(s)
  

Fixed submission:
N=int(input())
P=list(map(int,input().split()))
s=1
m=P[0]
for i in range(1,N):
  if P[i]<=m:
    m=P[i]
    s+=1
print(s)
Buggy python submission (verdict: Runtime Error):
import itertools
N=int(input())
P=list(map(int,input().split()))
Q=list(map(int,input().split()))
permutations=list(itertools.permutations(range(1,N+1)))
p=permutations.index(P)
q=permutations.index(Q)
ans=abs(p-q)
print(ans)

Fixed submission:
import itertools
N=int(input())
P=tuple(map(int,input().split()))
Q=tuple(map(int,input().split()))
permutations=list(itertools.permutations(range(1,N+1)))
p=permutations.index(P)
q=permutations.index(Q)
ans=abs(p-q)
print(ans)
Buggy python submission (verdict: Runtime Error):
import math
X=int(input())
for i in range(0,20):
  a=X+i
  b=a**0.5
  for j in range(2,math.floor(b)+1):
    if a%b!=0:
      print(a)
       break
break

Fixed submission:
X=int(input())
b=X**0.5
while any(X%i==0 for i in range(2,int(b)+1)):
  X+=1
else:
  print(X)

Buggy python submission (verdict: Runtime Error):
def main():
  import math
  X=int(input())
  for i in range(0,20):
    a=X+i
    b=a**0.5
    for j in range(2,math.floor(b)):
      if a%b!=0:
        print(a)
        break
  break

main()
     

Fixed submission:
X=int(input())
b=X**0.5
while any(X%i==0 for i in range(2,int(b)+1)):
  X+=1
else:
  print(X)

Buggy python submission (verdict: Runtime Error):
import math
X=int(input())
for i in range(0,X):
  a=X+i
  c=int(math.sqrt(a))
  for j in range(2,c):
    if a%j!=0:
      print(a)
break
      

Fixed submission:
X=int(input())
b=X**0.5
while any(X%i==0 for i in range(2,int(b)+1)):
  X+=1
else:
  print(X)

Buggy python submission (verdict: Runtime Error):
def main():
  X=int(input())
  for i in X:
    a=X+i
    if all(a%j!=0 for j in range(2,a)):
      print(a)
  break
main()

Fixed submission:
X=int(input())
b=X**0.5
while any(X%i==0 for i in range(2,int(b)+1)):
  X+=1
else:
  print(X)
Buggy python submission (verdict: Runtime Error):
N=int(input())
S,T=map(str,input().split())
U=str()
for i in range(N):
  U.append(S[i])
  U.append(T[i])
print(U)

Fixed submission:
N=int(input())
S,T=map(str,input().split())
a=str()
for i in range(N):
  a+=S[i]
  a+=T[i]
print(a)

Buggy python submission (verdict: Runtime Error):
N=int(input())
S,T=map(str,input().split())
a=()
for i in range(N):
  a+=S[i]
  a+=T[i]
print(a)
  
  

Fixed submission:
N=int(input())
S,T=map(str,input().split())
a=str()
for i in range(N):
  a+=S[i]
  a+=T[i]
print(a)

Buggy python submission (verdict: Runtime Error):
N=int(input())
S,T=map(str,input().split())
U=[]
for i in range(len(T)):
  U.append(S[i],T[i])
print(U)


Fixed submission:
N=int(input())
S,T=map(str,input().split())
a=str()
for i in range(N):
  a+=S[i]
  a+=T[i]
print(a)
Buggy python submission (verdict: Runtime Error):
N=int(input())
S=input()
n=len(S)
if n%2==0:
  T=S[0:n/2]
   if S==T+T:
     print("Yes")
   else:
     print("No")
else:
  print("No")

Fixed submission:
def main():
  N=int(input())
  S=input()
  n=len(S)
  T=S[0:n//2]
  if n%2==0:
    if S==T+T:
      print("Yes")
    else:
      print("No")
  else:
    print("No")
main()

Buggy python submission (verdict: Runtime Error):
def main():
  N=int(input())
  S=input()
  n=len(S)
  if n%2==0:
    half=S[0:n/2]
    if S=half+half:
      print("Yes")
    else:
      print("No")
  else:
    print("No")
main()
  

Fixed submission:
def main():
  N=int(input())
  S=input()
  n=len(S)
  T=S[0:n//2]
  if n%2==0:
    if S==T+T:
      print("Yes")
    else:
      print("No")
  else:
    print("No")
main()

Buggy python submission (verdict: Runtime Error):
def main():
  N=int(input())
  S=input()
  n=len(S)
  if n%2==0:
    if all(S[i]==S[n/2+i] for i in range(n/2)):
      print("Yes")
    else:
      print("No")
  else:
    print("No")
 main()

Fixed submission:
def main():
  N=int(input())
  S=input()
  n=len(S)
  T=S[0:n//2]
  if n%2==0:
    if S==T+T:
      print("Yes")
    else:
      print("No")
  else:
    print("No")
main()

Buggy python submission (verdict: Runtime Error):
def main():
  N=int(input())
  S=input()
  n=len(S)
  if n%2!=0:
    print("No")
  if n%2==0:
    if all(S[i]==S[n/2+i] for i in range(n/2)):
      print("Yes")
    else:
      print("No")
 main()

Fixed submission:
def main():
  N=int(input())
  S=input()
  n=len(S)
  T=S[0:n//2]
  if n%2==0:
    if S==T+T:
      print("Yes")
    else:
      print("No")
  else:
    print("No")
main()

Buggy python submission (verdict: Runtime Error):
def main()
  N=int(input())
  S=input()
  n=len(S)
  if n%2==0:
    if S[i]==S[n/2+i] for all(i in range(n/2)):
      print("Yes")
    else:
      print("No")
  else:
    print("No")
main()

Fixed submission:
def main():
  N=int(input())
  S=input()
  n=len(S)
  T=S[0:n//2]
  if n%2==0:
    if S==T+T:
      print("Yes")
    else:
      print("No")
  else:
    print("No")
main()

Buggy python submission (verdict: Runtime Error):
def main()
  N=int(input())
  S=input()
  n=len(S)
  if n%2==0:
    if S[i]==S[n/2+i] for all(i in range(n/2)):
      print("Yes")
    else:
      print("No")
  else:
    print("No")
      

Fixed submission:
def main():
  N=int(input())
  S=input()
  n=len(S)
  T=S[0:n//2]
  if n%2==0:
    if S==T+T:
      print("Yes")
    else:
      print("No")
  else:
    print("No")
main()
Buggy python submission (verdict: Runtime Error):
A,B=map(int,input()split())
if A>=B*2:
  print(A-B*2)
else:
  print(0)

Fixed submission:
A,B=map(int,input().split())
if A>=(B*2):
   print(A-(B*2))
else:
   print(0)
Buggy python submission (verdict: Runtime Error):
N=int(input())
d=map(int,input().split())
s=list(d)
l=[]
for i in range(N-1):
  for j in range(i+1,N):
  l.append(i*j)
print(sum(l))
   
  



Fixed submission:
N=int(input())
d=list(map(int,input().split()))
s=0
for i in range(0,N-1):
  s+=d[i]*sum(d[i+1:N])
print(s)

Buggy python submission (verdict: Runtime Error):
N=int(input())
d=list(map(int,input().split()))
s=0
for i in range(d):
  s+=d[i]*sum(d[i+1:N+1])
print(s)


Fixed submission:
N=int(input())
d=list(map(int,input().split()))
s=0
for i in range(0,N-1):
  s+=d[i]*sum(d[i+1:N])
print(s)

Buggy python submission (verdict: Runtime Error):
N=int(input())
d=list(map(int,input().split() for i in range(N)))
a=[]
for i in range(d):
  for j in range(d):
  a.append(set(i*j))
print(sum(a))

Fixed submission:
N=int(input())
d=list(map(int,input().split()))
s=0
for i in range(0,N-1):
  s+=d[i]*sum(d[i+1:N])
print(s)
Buggy python submission (verdict: Runtime Error):
N=int(input())
S=input()
c=1
for i in range(N):
  if S[i]!=S[i+1]:
    c+=1
print(c)

Fixed submission:
N=int(input())
S=input()
c=1
for i in range(1,N):
  if S[i-1]!=S[i]:
    c+=1
print(c)
Buggy python submission (verdict: Runtime Error):
import bisect
N=int(input())
L=list(map(int,input().split()))
L=sorted(L)
ans=0
for a in range(N):
  for b in range(a+1,N)):
    c=bisect.bisect_left(L,L[a]+L[b])
    if c>b:
      ans+=c-b-1
    else:
      ans=ans
print(ans)
      
    

Fixed submission:
import bisect
N=int(input())
L=list(map(int,input().split()))
i=0
L=sorted(L)
for a in range(N):
  for b in range(a+1,N):
    c=bisect.bisect_left(L,L[a]+L[b])
    if c>b:
      i+=c-b-1
    else:
      i=i
print(i)

Buggy python submission (verdict: Runtime Error):
N=int(input())
L=list(map(int,input().split()))
i=0
L=sorted(L)
for a in range(N):
  for b in range(a+1,N):
    c=bisect.bisect_left(L,L[a]+L[b])
    if c>b:
      i+=c-b
    else:
      i=i
print(i)

Fixed submission:
import bisect
N=int(input())
L=list(map(int,input().split()))
i=0
L=sorted(L)
for a in range(N):
  for b in range(a+1,N):
    c=bisect.bisect_left(L,L[a]+L[b])
    if c>b:
      i+=c-b-1
    else:
      i=i
print(i)
Buggy python submission (verdict: Runtime Error):
def main():
  N=int(input())
  s=0
  for i in range(1,N+1):
    if i%2==0:
       s=s
    else:
       s=s+1
print(s/N)
main()

Fixed submission:
N=int(input())
s=0
for i in range(1,N+1):
  if i%2==0:
    s=s
  else:
    s+=1
c=s/N
print(c)

Buggy python submission (verdict: Runtime Error):
def main():
  N=int(input())
  s=0
  for i in range(1,N+1):
    if i%2==0:
       s=s
    else:
       s=s+1
print(s/N)

Fixed submission:
N=int(input())
s=0
for i in range(1,N+1):
  if i%2==0:
    s=s
  else:
    s+=1
c=s/N
print(c)
Buggy python submission (verdict: Runtime Error):
S=list(input())
E=[]
O=[]
for i in range(len(S)):
  if i%2==0:
    E.append(S[i])
  else:
    O.append(S[i])
if R in E or L in O:
  print("No")
else:
  print("Yes")
S=list(input())
E=[]
O=[]
for i in range(len(S)):
  if i%2==0:
    E.append(S[i])
  else:
    O.append(S[i])
if "R" in E or "L" in O:
  print("No")
else:
  print("Yes")
提出情報

Fixed submission:
S=input()
if all(c  in 'RUD' for c in S[::2]) and all(c in 'LUD' for c in S[1::2]):
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
S=list(input())
E=[]
O=[]
for i in range(len(S)):
  if i%2==0:
    E.append(S[i])
  else:
    O.append(S[i])
if R in E or L in O:
  print("No")
else:
  print("Yes")

Fixed submission:
S=input()
if all(c  in 'RUD' for c in S[::2]) and all(c in 'LUD' for c in S[1::2]):
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
S=input()
O=[]
E=[]
for i in len(S):
  if i%2==0:
    E.append(S[i])
  else:
    O.append(S[i])
if L in O or R in E:
  print("No")
else:
  print("Yes")
  

Fixed submission:
S=input()
if all(c  in 'RUD' for c in S[::2]) and all(c in 'LUD' for c in S[1::2]):
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
N,K,Q=map(int,input().split())
point=[K]*n
for i in range(Q):
  A=int(input())
  A=A-1
  point[A]+=1
for j in range(N):
  if point[j]>Q:
    print("Yes")
  else:
    print("No")

Fixed submission:
N,K,Q=map(int,input().split())
point=[K]*N
for i in range(Q):
  A=int(input())
  A=A-1
  point[A]+=1
for j in range(N):
  if point[j]>Q:
    print("Yes")
  else:
    print("No")
Buggy python submission (verdict: Runtime Error):
N=int(input().split())
B=list(map(int,input().split()))
A=[0]*N
A[0]=B[0]
A{N-1]=B[N-2]
for i in range(1,N-2):
  A[i]=min(B[i-1],B[i])
print(sum(A))

Fixed submission:
N=int(input())
B=list(map(int,input().split()))
A=[0]*N
A[0]=B[0]
A[N-1]=B[N-2]
for i in range(1,N-1):
  A[i]=min(B[i-1],B[i])
print(sum(A))

Buggy python submission (verdict: Runtime Error):
N=int(input().split())
B=list(map(int,input().split()))
A=[0}*N
A[0]=B[0}
A{N-1]=B[N-2]
for i in range(1,N-2):
  A[i]=min(B[i-1],B[i])
print(sum(A))

Fixed submission:
N=int(input())
B=list(map(int,input().split()))
A=[0]*N
A[0]=B[0]
A[N-1]=B[N-2]
for i in range(1,N-1):
  A[i]=min(B[i-1],B[i])
print(sum(A))

Buggy python submission (verdict: Runtime Error):
N=int(input())
B=list(map(int,input().split()))
A=[0]*N
for i in range(N-1):
  if B[i]<B[i+1]:
    A[i]+=B[i],A[i+1]+=B[i],A[i+2]+=B[i+1]
  elif B[i]>B[i+1]:
    A[i]+=B[i],A[i+1]+=B[i+1],A[i+2]+=B[i+1]
  else:
    A[i]+=B[i],A[i+1]+=B[i],A[i+2]+=B[i]
print(sum(A))

Fixed submission:
N=int(input())
B=list(map(int,input().split()))
A=[0]*N
A[0]=B[0]
A[N-1]=B[N-2]
for i in range(1,N-1):
  A[i]=min(B[i-1],B[i])
print(sum(A))
Buggy python submission (verdict: Runtime Error):
N=int(input())
H=list(map(int,input().split()))
ans=0
cnt=o
for i in range(N-1):
  if H[i]>=H[i+1]:
    cnt+=1
  else:
    ans=max(cnt,ans)
    cnt=0
ans=max(ans,cnt)
print(ans)

Fixed submission:
N=int(input())
H=list(map(int,input().split()))
ans=0
cnt=0
for i in range(N-1):
  if H[i]>=H[i+1]:
    cnt+=1
  else:
    ans=max(cnt,ans)
    cnt=0
ans=max(ans,cnt)
print(ans)

Buggy python submission (verdict: Runtime Error):
N=int(input())
H=list(map(int,input().split()))
ans=0
cnt=o
for i in range(N-1):
  if H[i]>=H[i+1]:
    cnt+=1
  else:
    ans=max(cnt,ans)
    cnt=0
print(ans)

Fixed submission:
N=int(input())
H=list(map(int,input().split()))
ans=0
cnt=0
for i in range(N-1):
  if H[i]>=H[i+1]:
    cnt+=1
  else:
    ans=max(cnt,ans)
    cnt=0
ans=max(ans,cnt)
print(ans)

Buggy python submission (verdict: Runtime Error):
N=int(input())
H=list(map(int,input().split()))
i=0
s=o
t=[]
while H[i]>=H[i+1]:
  s+=1
  i+=1
  if H[i]<H[i+1]:
    t.append(s)
    break
print(max(t))

Fixed submission:
N=int(input())
H=list(map(int,input().split()))
ans=0
cnt=0
for i in range(N-1):
  if H[i]>=H[i+1]:
    cnt+=1
  else:
    ans=max(cnt,ans)
    cnt=0
ans=max(ans,cnt)
print(ans)

Buggy python submission (verdict: Runtime Error):
N=int(input())
H=list(map(int,input().split()))
s=[]
t=0
for i in range(N):
  while H[i]>H[i+1]:
    t+=1
  s.append(t)
print(max(s))

Fixed submission:
N=int(input())
H=list(map(int,input().split()))
ans=0
cnt=0
for i in range(N-1):
  if H[i]>=H[i+1]:
    cnt+=1
  else:
    ans=max(cnt,ans)
    cnt=0
ans=max(ans,cnt)
print(ans)