Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import numpy as np

dic={'.':0,'#':1}
N=int(input())
S=np.array([dic[i] for i in input()])
ans=N
arr=np.ones((N,N))


if S.sum()==0:
    print(0)
elif S.sum()==N:
    print(0)    
else:
    for i in range(N):
        arr[i,:N-i]=0
        ans=min(ans,(arr[i,:]!=S).sum())
        
    print(ans)

Fixed submission:
N = int(input())
S = input()
 
left_black=0
right_white=S.count(".")
ans=left_black+right_white

for i in S:
    if i==".":
        right_white-=1
        ans=min(ans,left_black+right_white)
    else:
        left_black+=1
        ans=min(ans,left_black+right_white)
print(ans)

Buggy python submission (verdict: Runtime Error):
import numpy as np

dic={'.':0,'#':1}
N=int(input())
S=np.array([dic[i] for i in input()])
ans=N
arr=np.ones((N,N))


if S.sum()==0:
    print(0)
elif S.sum()==N:
    print(0)    
else:
    for i in range(N):
        arr[i,:N-i]=0
        ans=min(ans,(arr[i,:]!=S).sum())
        
    print(ans)

Fixed submission:
N = int(input())
S = input()
 
left_black=0
right_white=S.count(".")
ans=left_black+right_white

for i in S:
    if i==".":
        right_white-=1
        ans=min(ans,left_black+right_white)
    else:
        left_black+=1
        ans=min(ans,left_black+right_white)
print(ans)

Buggy python submission (verdict: Runtime Error):
import numpy as np

dic={'.':0,'#':1}
N=int(input())
S=np.array([dic[i] for i in input()])

arr=np.ones((N,N))
for i in range(N):
    arr[i,:N-i]=0

if S.sum()==0:
    print(0)
elif S.sum()==N:
    print(0)    
else:
    print(min((arr!=S).sum(axis=1)))

Fixed submission:
N = int(input())
S = input()
 
left_black=0
right_white=S.count(".")
ans=left_black+right_white

for i in S:
    if i==".":
        right_white-=1
        ans=min(ans,left_black+right_white)
    else:
        left_black+=1
        ans=min(ans,left_black+right_white)
print(ans)

Buggy python submission (verdict: Runtime Error):
import numpy as np

dic={'.':0,'#':1}
N=int(input())
S=np.array([dic[i] for i in input()])
arr=np.flip(np.triu(np.ones((N,N))),axis=1)==0

if S.sum()==0:
    print(0)
elif S.sum()==N:
    print(0)    
else:
    print(min((arr!=S).sum(axis=1)))

Fixed submission:
N = int(input())
S = input()
 
left_black=0
right_white=S.count(".")
ans=left_black+right_white

for i in S:
    if i==".":
        right_white-=1
        ans=min(ans,left_black+right_white)
    else:
        left_black+=1
        ans=min(ans,left_black+right_white)
print(ans)
Buggy python submission (verdict: Runtime Error):
# coding: utf-8
a,b,c,d,e,k=map(int,input())
if e-a>k:
  print(':(')
else:
  print('Yay!')

Fixed submission:
# coding: utf-8
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
if e-a>k:
  print(':(')
else:
  print('Yay!')

Buggy python submission (verdict: Runtime Error):
a,b,c,d,e,k=map(int,input())
if e-a>k:
  print(':(')
else:
  print('Yay!')

Fixed submission:
# coding: utf-8
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
if e-a>k:
  print(':(')
else:
  print('Yay!')
Buggy python submission (verdict: Runtime Error):
#input
x,y,z,k=[int(i) for i in input().split()]
a=[int(i) for i in input().split()]
b=[int(i) for i in input().split()]
c=[int(i) for i in input().split()]

#sort
a=sorted(a,reverse=True)
b=sorted(b,reverse=True)
c=sorted(c,reverse=True)

q=[]
heappush(q,(-(a[0]+b[0]+c[0]),0,0,0))
s={(0,0,0)}

for n in range(k):
    p,h,i,j=heappop(q)
    
    if  (h+1<x) and ((h+1,i,j) not in s):
        heappush(q,(-(a[h+1]+b[i]+c[j]),h+1,i,j))
        s.add((h+1,i,j))
        
    if  (i+1<y) and ((h,i+1,j) not in s):
        heappush(q,(-(a[h]+b[i+1]+c[j]),h,i+1,j))
        s.add((h,i+1,j))
        
    if  (j+1<z) and ((h,i,j+1) not in s):
        heappush(q,(-(a[h]+b[i]+c[j+1]),h,i,j+1))        
        s.add((h,i,j+1))
        
    print(-p)
         
for j in range(1,k):
  q_value=q[-1][0]
  q_x=q[-1][1]
  q_y=q[-1][2]
  q_z=q[-1][3]
  new=max(

Fixed submission:
from heapq import heappop, heappush

#input
x,y,z,k=[int(i) for i in input().split()]
a=[int(i) for i in input().split()]
b=[int(i) for i in input().split()]
c=[int(i) for i in input().split()]

#sort
a=sorted(a,reverse=True)
b=sorted(b,reverse=True)
c=sorted(c,reverse=True)

q=[]
heappush(q,(-(a[0]+b[0]+c[0]),0,0,0))
s={(0,0,0)}

for n in range(k):
    p,h,i,j=heappop(q)
    
    if  (h+1<x) and ((h+1,i,j) not in s):
        heappush(q,(-(a[h+1]+b[i]+c[j]),h+1,i,j))
        s.add((h+1,i,j))
        
    if  (i+1<y) and ((h,i+1,j) not in s):
        heappush(q,(-(a[h]+b[i+1]+c[j]),h,i+1,j))
        s.add((h,i+1,j))
        
    if  (j+1<z) and ((h,i,j+1) not in s):
        heappush(q,(-(a[h]+b[i]+c[j+1]),h,i,j+1))        
        s.add((h,i,j+1))
        
    print(-p)
Buggy python submission (verdict: Runtime Error):
x=input()
dic={'A':'T',
      'C':'G',
      'G':'C',
      'T':,'A',
     }

print(dic[x])

Fixed submission:
x=input()
dic={'A':'T',
      'C':'G',
      'G':'C',
      'T':'A',
     }
 
print(dic[x])
Buggy python submission (verdict: Time Limit Exceeded):
N,Q=map(int,input().split())
y=input()
arr=[]
for i in range(len(y)-1):
    if y[i:i+2]=='AC':
        arr.append(1)
    else:
        arr.append(0)
        
for q in range(Q):
    l,r=map(int,input().split())
    print(sum(arr[l-1:r-1]))

Fixed submission:
import numpy as np

N,Q=map(int,input().split())
y=input()
arr=np.zeros(len(y))
for i in range(len(y)-1):
    if y[i:i+2]=='AC':
        arr[i+1]=arr[i]+1
    else:
        arr[i+1]=arr[i]
              
for q in range(Q):
    l,r=map(int,input().split())
    print(int(arr[r-1]-arr[l-1]))

Buggy python submission (verdict: Time Limit Exceeded):
N,Q=map(int,input().split())
S=input()
answers=[]
for q in range(Q):
    l,r=map(int,input().split())
    y=S[l-1:r]
    ans=0
    if 'AC' in y:
        for i in range(len(y)-1):
            if y[i:i+2]=='AC':
                ans+=1
    answers.append(ans)
    
for j in range(len(answers)):
    print(answers[j])

Fixed submission:
import numpy as np

N,Q=map(int,input().split())
y=input()
arr=np.zeros(len(y))
for i in range(len(y)-1):
    if y[i:i+2]=='AC':
        arr[i+1]=arr[i]+1
    else:
        arr[i+1]=arr[i]
              
for q in range(Q):
    l,r=map(int,input().split())
    print(int(arr[r-1]-arr[l-1]))

Buggy python submission (verdict: Time Limit Exceeded):
N,Q=map(int,input().split())
S=input()
for q in range(Q):
    l,r=map(int,input().split())
    y=S[l-1:r]
    ans=0
    for i in range(len(y)-1):
        if y[i:i+2]=='AC':
            ans+=1
    print(ans)    

Fixed submission:
import numpy as np

N,Q=map(int,input().split())
y=input()
arr=np.zeros(len(y))
for i in range(len(y)-1):
    if y[i:i+2]=='AC':
        arr[i+1]=arr[i]+1
    else:
        arr[i+1]=arr[i]
              
for q in range(Q):
    l,r=map(int,input().split())
    print(int(arr[r-1]-arr[l-1]))
Buggy python submission (verdict: Time Limit Exceeded):
from itertools import combinations

N=int(input())
A=[i for i in map(int,input().split())]

def gcd(x,y):
    while y!=0:
        x , y = y , x%y
    return x

ans=1e10
for comb in combinations(A,2):
    ans=min(ans,gcd(comb[0],comb[1]))
print(ans)

Fixed submission:
from itertools import combinations

N=int(input())
A=[i for i in map(int,input().split())]

def gcd(x,y):
    while y!=0:
        x , y = y , x%y
    return x

ans=A[0]
for i in range(1,len(A)):
    ans=min(ans,gcd(ans,A[i]))
print(ans)
Buggy python submission (verdict: Runtime Error):
import math
n, k = map(int, input().split())

mod = 10**9+7
sum = 0
for i in range(1,k+1):
    if n-k+1 < i:
        print(0)
    else:
        combi = math.factorial(k-1) / (math.factorial(i-1) * math.factorial(k-i))
        tmp = (math.factorial(n-k+i) / (math.factorial(n-k) * math.factorial(i)) - sum) * combi
        print(int(tmp%mod))
        sum += tmp


Fixed submission:
import math
n, k = map(int, input().split())

def combination(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))
mod = 10**9+7
for i in range(1,k+1):
    if n-k+1 < i:
        print(0)
    else:
        print(combination(n-k+1, i)*combination(k-1, i-1)%mod)

Buggy python submission (verdict: Runtime Error):
import math
n, k = map(int, input().split())

mod = 10**9+7
sum = 0
for i in range(1,k+1):
    combi = math.factorial(k-1)/(math.factorial(i-1)*math.factorial(k-i))
    
    tmp = (math.factorial(n-k+i)/(math.factorial(n-k)*math.factorial(i)) - sum) * combi
    print(int(tmp%mod))
    sum += tmp


Fixed submission:
import math
n, k = map(int, input().split())

def combination(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))
mod = 10**9+7
for i in range(1,k+1):
    if n-k+1 < i:
        print(0)
    else:
        print(combination(n-k+1, i)*combination(k-1, i-1)%mod)
Buggy python submission (verdict: Runtime Error):
import math
n, l = map(int, input().split())

total = sum(list(range(l, n+l)))
pie = []
min_abs = math.inf
for i in range(n):
    a = list(range(l, n+l))
    a.pop(i)
    if abs(total-sum(a)) < min_abs:
        min_abs = abs(total-sum(a))
        ans = sum(a)
print(ans)

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

total = sum(list(range(l, n+l)))
pie = []
min_abs = 9999999
for i in range(n):
    a = list(range(l, n+l))
    a.pop(i)
    if abs(total-sum(a)) < min_abs:
        min_abs = abs(total-sum(a))
        ans = sum(a)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
# coding: utf-8 
r, g, b, n = map(int, input().split())
cnt = 0
for i in range(n//r+1):
    for j in range((n-i*r)//g+1):
        if n-i*r-j*g>=0 and (n-i*r-j*g)%b==0:
            cnt+=1
print(cnt)


Fixed submission:
# coding: utf-8 
r, g, b, n = map(int, input().split())
cnt = 0
for i in range(n//r+1):
    for j in range((n-i*r)//g+1):
        if (n-i*r-j*g)%b==0:
            cnt+=1
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
# coding: utf-8 
r, g, b, n = map(int, input().split())
cnt = 0
for i in range(n//r+1):
    for j in range(n//g+1):
        if n-i*r-j*g>=0 and (n-i*r-j*g)%b==0:
            cnt+=1
print(cnt)


Fixed submission:
# coding: utf-8 
r, g, b, n = map(int, input().split())
cnt = 0
for i in range(n//r+1):
    for j in range((n-i*r)//g+1):
        if (n-i*r-j*g)%b==0:
            cnt+=1
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
# coding: utf-8 
r, g, b, n = map(int, input().split())
a = [r, g, b]
a.sort()
cnt = 0
for i in range(n//a[0]+1):
    for j in range(n//a[1]+1):
        if n-i*a[0]-j*a[1]>=0 and (n-i*a[0]-j*a[1])%a[2]==0:
            cnt+=1
print(cnt)


Fixed submission:
# coding: utf-8 
r, g, b, n = map(int, input().split())
cnt = 0
for i in range(n//r+1):
    for j in range((n-i*r)//g+1):
        if (n-i*r-j*g)%b==0:
            cnt+=1
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
# coding: utf-8 
r, g, b, n = map(int, input().split())
a = [r, g, b]
a.sort()
cnt = 0
for i in range(n//a[2]+1):
    for j in range(n//a[1]+1):
        if n-i*a[2]-j*a[1]>=0 and (n-i*a[2]-j*a[1])%a[0]==0:
            cnt+=1
print(cnt)


Fixed submission:
# coding: utf-8 
r, g, b, n = map(int, input().split())
cnt = 0
for i in range(n//r+1):
    for j in range((n-i*r)//g+1):
        if (n-i*r-j*g)%b==0:
            cnt+=1
print(cnt)
Buggy python submission (verdict: Runtime Error):
t=[int(input()) for _ in range(5)]
ans=0
b=[x%10 for x in t]
c=[x%10 for x in t if x%10>0]
for i in range(5):
    if b[i]>0:
        ans+=(t[i]//10+1)*10
    else:
        ans+=t[i]
print(ans-10+min(c))

Fixed submission:
t=[int(input()) for _ in range(5)]
ans=0
b=[x%10 for x in t]
c=[x%10 for x in t if x%10>0]
if c==[]:
    print(sum(t))
else:
    for i in range(5):
        if b[i]>0:
            ans+=(t[i]//10+1)*10
        else:
            ans+=t[i]
    print(ans-10+min(c))
Buggy python submission (verdict: Time Limit Exceeded):
n,q=map(int, input().split())
s=input()
lr=[list(map(int, input().split())) for _ in range(q)]
for i in range(q):
    p=s[lr[i][0]-1:lr[i][1]]
    print(p.count('AC'))

Fixed submission:
n,q=map(int, input().split())
s=input()
lr=[list(map(int, input().split())) for _ in range(q)]
count=[0]*(n)
for i in range(1,n):
    if s[i-1]+s[i]=='AC':
        count[i]+=count[i-1]+1
    else:
        count[i]+=count[i-1]
for j in range(q):
    start=lr[j][0]-1
    end=lr[j][1]-1
    print(count[end]-count[start])
Buggy python submission (verdict: Runtime Error):
n=int(input())
import bisect
import itertools
l=len(str(n))
ans=[]
num=[]
for k in range(3,l+1):
    m=list(itertools.product(x, repeat=k))
    num.extend(m)
for i in range(len(num)):
    y=num[i]
    if '3' in y and '5' in y and '7' in y:
        number=''
        for j in range(len(y)):
            number+=y[j]
        ans.append(int(number))
ans.sort()
print(bisect.bisect_left(ans, n))

Fixed submission:
n=int(input())
import bisect
import itertools
l=len(str(n))
ans=[]
num=[]
x=['3', '5', '7']
for k in range(3,l+1):
    m=list(itertools.product(x, repeat=k))
    num.extend(m)
for i in range(len(num)):
    y=num[i]
    if '3' in y and '5' in y and '7' in y:
        number=''
        for j in range(len(y)):
            number+=y[j]
        ans.append(int(number))
ans.sort()
print(bisect.bisect_right(ans, n))

Buggy python submission (verdict: Runtime Error):
n=int(input())
import bisect
import itertools
ans=[]
num=[]
for i in range(3,l+1):
    m=list(itertools.product(x, repeat=i))
    num.extend(m)
for i in range(len(num)):
    y=num[i]
    if '3' in y and '5' in y and '7' in y:
        number=''
        for j in range(len(y)):
            number+=y[j]
        ans.append(int(number))
ans.sort()
print(bisect.bisect_left(ans, n))

Fixed submission:
n=int(input())
import bisect
import itertools
l=len(str(n))
ans=[]
num=[]
x=['3', '5', '7']
for k in range(3,l+1):
    m=list(itertools.product(x, repeat=k))
    num.extend(m)
for i in range(len(num)):
    y=num[i]
    if '3' in y and '5' in y and '7' in y:
        number=''
        for j in range(len(y)):
            number+=y[j]
        ans.append(int(number))
ans.sort()
print(bisect.bisect_right(ans, n))
Buggy python submission (verdict: Runtime Error):
n=int(input())
v=list(map(int, input().split()))
import collections
v1=v[0::2]
v11=collections.Counter(v1)
v2=v[1::2]
v22=collections.Counter(v2)
ans=0
o=v11.most_common()[0][0]
e=v22.most_common()[0][0]
if e!=o:
    for x in v1:
        if x!=o:
            ans+=1
    for y in v2:
        if y!=e:
            ans+=1
else:
    if v1.count(o)>v2.count(e):
        for x in v1:
            if x!=o:
                ans+=1
        for y in v2:
            if y!=v22.most_common()[1][0]:
                ans+=1
    else:
        for x in v1:
            if x!=v11.most_common()[1][0]:
                ans+=1
        for y in v2:
            if y!=v2:
                ans+=1
print(ans)

Fixed submission:
n=int(input())
v=list(map(int, input().split()))
import collections
v1=v[0::2]
v11=collections.Counter(v1)
v2=v[1::2]
v22=collections.Counter(v2)
o=v11.most_common()+([(0,0)])
e=v22.most_common()+([(0,0)])
if o[0][0]!=e[0][0]:
    print(n-o[0][1]-e[0][1])
else:
    print(min(n-o[0][1]-e[1][1],n-o[1][1]-e[0][1]))
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=[int(input()) for _ in range(n)]
unique=set(a)
ans=0
for x in unique:
    if a.count(x)%2>0:
        ans+=1
print(ans)

Fixed submission:
n=int(input())
a=[int(input()) for _ in range(n)]
import collections
unique=set(a)
c=collections.Counter(a)
ans=0
for x in unique:
    if c[x]%2>0:
        ans+=1
print(ans)
Buggy python submission (verdict: Runtime Error):
nCr = {}
def cmb(n, r):
    if r == 0 or r == n: return 1
    if r == 1: return n
    if (n,r) in nCr: return nCr[(n,r)]
    nCr[(n,r)] = cmb(n-1,r) + cmb(n-1,r-1)
    return nCr[(n,r)]

S = int(input())

sho = S // 3
ans = 1
S -= 5
if sho > 0:
    for i in range(1,sho):
        ans += cmb(S, i)
        S -= 2
    print((ans)%(10**9+7))
else:
    print(0)

Fixed submission:
from scipy.special import comb

S = int(input())

sho = S // 3
ans = 1
S -= 5
if sho > 0:
    for i in range(1,sho):
        ans += comb(S, i, exact=True)
        S -= 2
    print(int(ans)%(10**9+7))
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
s = input()
t = input()
lent = len(t)
ans = []
for i in range(len(s) - lent):
    ss = s[i:i+lent]
    ans1 = 0
    for s1, t1 in zip(ss, t):
        ans1 += (s1==t1)
    ans.append(ans1)
print(lent-max(ans))

Fixed submission:
s = input()
t = input()
lent = len(t)
ans = []
if len(s) == lent:
    ans1 = 0
    for s1, t1 in zip(s, t):
        ans1 += (s1==t1)
    ans.append(ans1)
else:
    for i in range(len(s) - lent):
        ss = s[i:i+lent]
        ans1 = 0
        for s1, t1 in zip(ss, t):
            ans1 += (s1==t1)
        ans.append(ans1)
print(lent-max(ans))

Buggy python submission (verdict: Runtime Error):
s = input()
t = input()
lent = len(t)
ans = []
for i in range(len(s) - lent):
    ss = s[i:i+lent]
    ans1 = 0
    for s1, t1 in zip(ss, t):
        ans1 += (s1==t1)
    ans.append(ans1)
print(lent-max(ans))

Fixed submission:
s = input()
t = input()
lent = len(t)
ans = []
if len(s) == lent:
    ans1 = 0
    for s1, t1 in zip(s, t):
        ans1 += (s1==t1)
    ans.append(ans1)
else:
    for i in range(len(s) - lent):
        ss = s[i:i+lent]
        ans1 = 0
        for s1, t1 in zip(ss, t):
            ans1 += (s1==t1)
        ans.append(ans1)
print(lent-max(ans))
Buggy python submission (verdict: Runtime Error):
import bisect

man_count = int(input())

infos = [int(i) for i in input().split()]
infos.sort()

next_num = 0
end = 0
for i in range(len(infos)+1):
    if i != next_num:
        print(0)
        continue
    # 速度を上げるために添え字を吹き飛ばそう。
    start = bisect.bisect_right(infos, i+1, end)  # iが始まる添え字を得る。
    print(start - end)
    end = start

    # 添え字が最後の場合 or 最後でない で切り分け必要。
    if start != len(infos):
        next_num = infos[start+1]
    else:
        next_num = infos[start-1]
#for i in ans:
#    print(i)



Fixed submission:
import bisect

man_count = int(input())

infos = [int(i) for i in input().split()]
infos.sort()

next_num = 0
end = 0
for i in range(len(infos)+1):
    if i != next_num:
        print(0)
        continue

    # 速度を上げるために添え字を吹き飛ばそう。
    start = bisect.bisect_right(infos, i+1, end)  # iが始まる添え字を得る。
    print(start - end)
    end = start

    # 添え字が最後の場合 or 最後でない で切り分け必要。
    if start == len(infos):
      next_num = infos[start-1] -1
    else:
      next_num = infos[start] -1

#for i in ans:
#    print(i)

Buggy python submission (verdict: Time Limit Exceeded):

man_count = int(input())

infos = [int(i) for i in input().split()]

ans = []

for i in range(len(infos)+1):
    print(infos.count(i+1))
    # work = infos.count(i+1)
    # ans.append(work)

#for i in ans:
#    print(i)



Fixed submission:
import bisect

man_count = int(input())

infos = [int(i) for i in input().split()]
infos.sort()

next_num = 0
end = 0
for i in range(len(infos)+1):
    if i != next_num:
        print(0)
        continue

    # 速度を上げるために添え字を吹き飛ばそう。
    start = bisect.bisect_right(infos, i+1, end)  # iが始まる添え字を得る。
    print(start - end)
    end = start

    # 添え字が最後の場合 or 最後でない で切り分け必要。
    if start == len(infos):
      next_num = infos[start-1] -1
    else:
      next_num = infos[start] -1

#for i in ans:
#    print(i)

Buggy python submission (verdict: Time Limit Exceeded):

man_count = int(input())

infos = [int(i) for i in input().split()]

ans = []

for i in range(len(infos)+1):
    work = infos.count(i+1)
    ans.append(work)

for i in ans:
    print(i)



Fixed submission:
import bisect

man_count = int(input())

infos = [int(i) for i in input().split()]
infos.sort()

next_num = 0
end = 0
for i in range(len(infos)+1):
    if i != next_num:
        print(0)
        continue

    # 速度を上げるために添え字を吹き飛ばそう。
    start = bisect.bisect_right(infos, i+1, end)  # iが始まる添え字を得る。
    print(start - end)
    end = start

    # 添え字が最後の場合 or 最後でない で切り分け必要。
    if start == len(infos):
      next_num = infos[start-1] -1
    else:
      next_num = infos[start] -1

#for i in ans:
#    print(i)
Buggy python submission (verdict: Time Limit Exceeded):
# 入力の取得
i = list(map(int, input().split()))
kazoeru = i[0]
ao = i[1]
aka= i[2]
kaisuu = i[0]/(i[1]+i[2])

number = 0
list = []

# リスト作成
while number <= kaisuu:
    # 青いボールを追加
    ball = 0
    while ball < ao:
        list.append("ao")
        ball += 1

    # 赤いボールを追加
    ball = 0
    while ball < aka:
        list.append("aka")
        ball += 1
    #回数加算
    number += 1

# 青ボールを数える
number = 0
aonokazu = 0
while number < kazoeru:
    if list[number] == "ao":
        aonokazu += 1
    number += 1

print(aonokazu)

Fixed submission:
# 入力の取得
i = list(map(int, input().split()))
kazoeru = i[0]
ao = i[1]
aka= i[2]
kaisuu = i[0]/(i[1]+i[2])

answer = divmod(kazoeru, (i[1]+i[2]))

if ao == 0:
    print(0)
    exit()

#商の分を計算
aa = ao * answer[0]

#あまりの分を計算
if answer[1] == 0:
    print(aa)
    exit()

#あまり6で、青が6なら
# あまりが青より多いなら(あまり4、青2)
if answer[1] >= ao:
    aa += ao
#あまりが青より少ないなら(あまり1、青3)
else:
    aa += answer[1]
print(aa)
Buggy python submission (verdict: Runtime Error):
    # 入力の取得(空白を除く)
    s = list(input().split())

    # 処理
    isPoor = False
    if s[0] == s[1] and s[1] != s[2]:
        isPoor = True
    if s[1] == s[2] and s[2] != s[0]:
        isPoor = True
    if s[2] == s[0] and s[0] != s[1]:
        isPoor = True

    if isPoor:
        print("Yes")
    else:
        print("No")


Fixed submission:
# 入力の取得(空白を除く)
s = list(input().split())

# 処理
isPoor = False
if s[0] == s[1] and s[1] != s[2]:
  isPoor = True
if s[1] == s[2] and s[2] != s[0]:
    isPoor = True
if s[2] == s[0] and s[0] != s[1]:
	isPoor = True

if isPoor:
	print("Yes")
else:
	print("No")