Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
N ,W = map(int,input().split())
L = []
for _ in range(N):
    l = list(map(int,input().split()))
    L.append(l)
dp = [[0 for _ in range(W + 10)] for _ in range(N + 10)]
for i in range(N):
    for w in range(W+1):
        if w+L[i][0] <= W:
            dp[i+1][w+L[i][0]] =max(dp[i][w]+L[i][1], dp[i+1][w+L[i][0]])
        dp[i+1][w] = max(dp[i][w], dp[i+1][w])
ans = 0
for w in range(W+1):
    ans = max(ans,dp[N][w])
print(ans)



Fixed submission:
N ,W = map(int,input().split())
L = []
for _ in range(N):
    l = list(map(int,input().split()))
    L.append(l)
dp = [[0 for _ in range(W + 10)] for _ in range(N + 10)]
for i in range(N):
    for w in range(W+1):
        if w+L[i][0] <= W:
            dp[i+1][w+L[i][0]] =max(dp[i][w]+L[i][1], dp[i+1][w+L[i][0]])
        dp[i+1][w] = max(dp[i][w], dp[i+1][w])
ans = 0
for w in range(W+1):
    ans = max(ans,dp[N][w])
print(ans)

Buggy python submission (verdict: Runtime Error):
N ,W = map(int,input().split())
L = []
for _ in range(N):
    l = list(map(int,input().split()))
    L.append(l)
dp = [[0 for _ in range(N + 10)] for _ in range(W + 10)]
for i in range(N):
    for w in range(W+1):
        if w+L[i][0] <= W:
            dp[i+1][w+L[i][0]] =max(dp[i][w]+L[i][1], dp[i+1][w+L[i][0]])
        dp[i+1][w] = max(dp[i][w], dp[i+1][w])
ans = 0
for w in range(W+1):
    ans = max(ans,dp[N][w])
print(ans)


Fixed submission:
N ,W = map(int,input().split())
L = []
for _ in range(N):
    l = list(map(int,input().split()))
    L.append(l)
dp = [[0 for _ in range(W + 10)] for _ in range(N + 10)]
for i in range(N):
    for w in range(W+1):
        if w+L[i][0] <= W:
            dp[i+1][w+L[i][0]] =max(dp[i][w]+L[i][1], dp[i+1][w+L[i][0]])
        dp[i+1][w] = max(dp[i][w], dp[i+1][w])
ans = 0
for w in range(W+1):
    ans = max(ans,dp[N][w])
print(ans)

Buggy python submission (verdict: Runtime Error):
N ,W = map(int,input().split())
L = []
for _ in range(N):
    l = list(map(int,input().split()))
    L.append(l)
dp = [[0 for _ in range(N + 10)] for _ in range(W + 10)]
for i in range(N):
    for w in range(W+1):
        if w+L[i][0] <= W:
            dp[i+1][w+L[i][0]] =max(dp[i][w]+L[i][1], dp[i+1][w+L[i][0]])
        dp[i+1][w] = max(dp[i][w], dp[i+1][w])
ans = 0
for w in range(W+1):
    ans = max(ans,dp[N][w])
print(ans)


Fixed submission:
N ,W = map(int,input().split())
L = []
for _ in range(N):
    l = list(map(int,input().split()))
    L.append(l)
dp = [[0 for _ in range(W + 10)] for _ in range(N + 10)]
for i in range(N):
    for w in range(W+1):
        if w+L[i][0] <= W:
            dp[i+1][w+L[i][0]] =max(dp[i][w]+L[i][1], dp[i+1][w+L[i][0]])
        dp[i+1][w] = max(dp[i][w], dp[i+1][w])
ans = 0
for w in range(W+1):
    ans = max(ans,dp[N][w])
print(ans)
Buggy python submission (verdict: Runtime Error):
V, M = map(int,input().split())
L = [[] for _ in range(V+1)]
DP = [-1 for _ in range (V + 2)]
for _ in range(M):
    x,y = map(int,input().split())
    L[x-1].append(y-1)

def rec(v):
    if DP[v] != -1: return DP[v]
    ret = 0
    for x in L[v]:
        ret = max(ret,rec(x)+1)
    DP[v] = ret
    return DP[v]
ans = 0
for i in range(V):
    ans = max(ans, rec(i))
print(ans)


Fixed submission:
import sys
sys.setrecursionlimit(10000000)

V, M = map(int,input().split())
L = [[] for _ in range(V+1)]
DP = [-1 for _ in range (V + 2)]
for _ in range(M):
    x,y = map(int,input().split())
    L[x-1].append(y-1)

def rec(v):
    if DP[v] != -1: return DP[v]
    ret = 0
    for x in L[v]:
        ret = max(ret,rec(x)+1)
    DP[v] = ret
    return DP[v]
ans = 0
for i in range(V):
    ans = max(ans, rec(i))
print(ans)
Buggy python submission (verdict: Runtime Error):
N = input()
cnt1 = 0
for x in N:
  if x == 'B':
    cnt1 += 1
N = N[::-1]
ans =  0
cnt2 = 0
for i in range(N):
  if N[i] == 'B':
    ans += i - cnt2
    cnt2 += 1
print(ans)

Fixed submission:
N = input()
cnt1 = 0
for x in N:
  if x == 'B':
    cnt1 += 1
N = N[::-1]
ans =  0
cnt2 = 0
for i in range(len(N)):
  if N[i] == 'B':
    ans += i - cnt2
    cnt2 += 1
print(ans)

Buggy python submission (verdict: Runtime Error):
S = list(input())
s = sorted(S)[::-1]
B = []
W = []

for i in range(len(S)):
    if S[i] == 'B':
        B.append(i)
    else:
        W.append(i)

W = W[::-1]
#print(B,W)
cnt = 0
while True:
    if B == [] :
        break
    tmpB = B.pop(0)
    tmpW = W.pop(0)
    if tmpB >= tmpW:
        break
    cnt += tmpW - tmpB
    W.append(tmpB)
print(cnt)


Fixed submission:
N = input()
cnt1 = 0
for x in N:
  if x == 'B':
    cnt1 += 1
N = N[::-1]
ans =  0
cnt2 = 0
for i in range(len(N)):
  if N[i] == 'B':
    ans += i - cnt2
    cnt2 += 1
print(ans)

Buggy python submission (verdict: Runtime Error):
S = list(input())
s = sorted(S)[::-1]
B = []
W = []

for i in range(len(S)):
    if S[i] == 'B':
        B.append(i)
    else:
        W.append(i)

W = W[::-1]
#print(B,W)
cnt = 0
while True:
    if B == [] :
        break
    tmpB = B.pop(0)
    tmpW = W.pop(0)
    if tmpB >= tmpW:
        break
    cnt += tmpW - tmpB
    W.append(tmpB)
print(cnt)


Fixed submission:
N = input()
cnt1 = 0
for x in N:
  if x == 'B':
    cnt1 += 1
N = N[::-1]
ans =  0
cnt2 = 0
for i in range(len(N)):
  if N[i] == 'B':
    ans += i - cnt2
    cnt2 += 1
print(ans)

Buggy python submission (verdict: Runtime Error):
S = list(input())
s = sorted(S)[::-1]
B = []
W = []

for i in range(len(S)):
    if S[i] == 'B':
        B.append(i)
    else:
        W.append(i)

W = W[::-1]
#print(B,W)
cnt = 0
while True:
    if B == [] :
        break
    tmpB = B.pop(0)
    tmpW = W.pop(0)
    if tmpB >= tmpW:
        break
    cnt += tmpW - tmpB
    W.append(tmpB)
print(cnt)


Fixed submission:
N = input()
cnt1 = 0
for x in N:
  if x == 'B':
    cnt1 += 1
N = N[::-1]
ans =  0
cnt2 = 0
for i in range(len(N)):
  if N[i] == 'B':
    ans += i - cnt2
    cnt2 += 1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
S = list(input())
s = sorted(S)[::-1]
def change(x):
    n = len(x) - 1
    rev = x[::-1]
    indexB = x.index('B')
    indexW = n -  rev.index('W')
    x[indexB] = 'W'
    x[indexW] = 'B'
    return indexW - indexB
cnt = 0 
while True:
    if s == S:
        break
    cnt += change(S)
print(cnt)


Fixed submission:
N = input()
cnt1 = 0
for x in N:
  if x == 'B':
    cnt1 += 1
N = N[::-1]
ans =  0
cnt2 = 0
for i in range(len(N)):
  if N[i] == 'B':
    ans += i - cnt2
    cnt2 += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
#include <stdio.h>
#include <string.h>
#include <math.h>

int main(void){
        int N = 0;
        scanf("%d", &N);
        int l[N];
        for (int i = 0; i < N; i++) {
                        scanf("%d", &l[i]);
        }
        int tmp = -1;
        int sum = 0;
        for (int i = 0; i < N; i++) {
                        if (tmp < l[i]) tmp = l[i];sum += l[i];
        }
        printf("%d\n",sum - tmp / 2);
//      for (int i = 0; i < N; i++) {
//                      printf("%d\n",l[i]);
//      }
        return 0;
}

Fixed submission:
N=int(input())
L=[int(input()) for _ in range(N)]

ans=sum(L)-max(L)/2
print(int(ans))
Buggy python submission (verdict: Runtime Error):
N = int(input())
L = []
for _ in range(N):
    l = list(map(int,input().split()))
    if l[2] != 0:
        L.append(l)
#print(L)

for i in range(101):
    for j in range(101):
        tmp = -1
        for x in L:
            H = abs(x[0]-i) + abs(x[1]-j) + x[2]
            if H < 1:
                break
            if tmp != -1 and tmp != H:
                break
            else:
                tmp = H
        else:
            for x in L:
                if x[2]==max(0,H-abs(x[0]-i)-abs(x[1]-j)):
                    pass
                else:
                    break
            else:
                print(i,j,H)

Fixed submission:
N = input()
if N == '1':
  print('Hello World')
else :
  a = input()
  b = input()
  print(int(a) + int(b))

Buggy python submission (verdict: Runtime Error):
N = input()
if N == 1:
  print('Hello World')
else :
  a = input()
  b = input()
  print(int(a) + int(b))

Fixed submission:
N = input()
if N == '1':
  print('Hello World')
else :
  a = input()
  b = input()
  print(int(a) + int(b))

Buggy python submission (verdict: Runtime Error):
N = input()
if N == 1:
  print('Hello World')
else :
  a = input()
  b = input()
  print(a + b)

Fixed submission:
N = input()
if N == '1':
  print('Hello World')
else :
  a = input()
  b = input()
  print(int(a) + int(b))
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
l = []
for _ in range(a):
  x, y = map(int, input().split())
  if y <= b:
    l.append(x)
print(min(l))

Fixed submission:
a, b = map(int, input().split())
l = []
for _ in range(a):
  x, y = map(int, input().split())
  if y <= b:
    l.append(x)
if l == []:
  print('TLE')
else:
  print(min(l))
Buggy python submission (verdict: Runtime Error):
n = int(input())
ans = []
L = list(map(int,input().split()))
if len(list(filter(lambda x:x==L[0] ,L))) == len(L):
    print(n//2)
    quit()


import collections as col
L1 = L[::2]
L2 = L[1::2]
c1 = list(col.Counter(L1).items())
c2 = list(col.Counter(L2).items())

for i in range(2):
    for j in range(2):
        tmp1 = c1[i][0]
        tmp2 = c2[j][0]
        if tmp1 == tmp2 :
            continue
        a1 = n//2 - c1[i][1]
        a2 = n//2 - c1[j][1]
        ans.append(a1+a2)
print(min(ans))

Fixed submission:
n = int(input())
ans = []
L = list(map(int,input().split()))
if len(list(filter(lambda x:x==L[0] ,L))) == len(L):
    print(n//2)
    quit()


import collections as col
L1 = L[::2]
L2 = L[1::2]
c1 = sorted(list(col.Counter(L1).items()),key=lambda x:x[1])[::-1]
c2 =sorted(list(col.Counter(L2).items()),key=lambda x:x[1])[::-1]

for i in range(3):
    for j in range(3):
        try:
            tmp1 = c1[i][0]
            tmp2 = c2[j][0]
            if tmp1 == tmp2 :
                continue
            a1 = n//2 - c1[i][1]
            a2 = n//2 - c2[j][1]
            ans.append(a1+a2)
        except:
            pass
print(min(ans))
Buggy python submission (verdict: Runtime Error):
import math
from functools import reduce
a,b=input().split()
l=sorted([int(x)-int(b) for x in input().split()])
print(abs(reduce(math.gcd, l)))

Fixed submission:

import math
from functools import reduce
a,b=input().split()
l=sorted([abs(int(x)-int(b)) for x in input().split()])

def gcd(a,b):
    if a < b:
        a,b = b,a
    if  b==0:
        return a
    c = a % b
    return gcd(b,c)
while len(l)!=1:
    l.append(gcd(l.pop(0),l.pop(-1)))
print(sum(l))

Buggy python submission (verdict: Runtime Error):

import math
from functools import reduce
a,b=input().split()
l=sorted([int(x)-int(b) for x in input().split()])
print(abs(reduce(math.gcd, l)))



Fixed submission:

import math
from functools import reduce
a,b=input().split()
l=sorted([abs(int(x)-int(b)) for x in input().split()])

def gcd(a,b):
    if a < b:
        a,b = b,a
    if  b==0:
        return a
    c = a % b
    return gcd(b,c)
while len(l)!=1:
    l.append(gcd(l.pop(0),l.pop(-1)))
print(sum(l))
Buggy python submission (verdict: Runtime Error):
N,i = int(input().split())
print(N-i+1)


Fixed submission:
N,i = map(int,input().split())
print(N-i+1)
Buggy python submission (verdict: Runtime Error):
H,W = map(int,input().split())
L = []


for _ in range(H):
    s=input()
    l=[]
    for x in s:
        l.append(x)
    for x in l:
        if x == ".":
            pass
        else:
            L.append(l)
            break
delete=[]
for i in range(W):
    cnt = 0
    for j in range(len(L)):
        if L[j][i]  == '.':
            cnt += 1
        else:
            cnt = 0
    if cnt == len(L):
        delete.append(i)
for i in delete:
    for j in range(len(L)):
        del L[j][i]
for x in L:
    for y in x:
        print(y,end="")
    print()


Fixed submission:
H,W = map(int,input().split())
L = []


for _ in range(H):
    s=input()
    l=[]
    for x in s:
        l.append(x)
    for x in l:
        if x == ".":
            pass
        else:
            L.append(l)
            break
delete=[]
cou=0
for i in range(W):
    cnt = 0
    for j in range(len(L)):
        if L[j][i]  == '.':
            cnt += 1
        else:
            cnt = 0
    if cnt == len(L):
        delete.append(i-cou)
        cou+=1
for i in delete:
    for j in range(len(L)):
        del L[j][i]

for x in L:
    for y in x:
        print(y,end="")
    print()
Buggy python submission (verdict: Time Limit Exceeded):
a,b,c= input().split()
l=[]
m=[]
for i in range (int(b)):
    l.append([int(i) for i in input().split() ])
for i in range (int(c)):
    m.append([int(i) for i in input().split() ])
# print (l,m)
s=0
for j in m:
    for i in l:
        if j[0]<=i[0] and i[1]<=j[1]:
            s+=1
    print(s)
    s=0


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

L = [[0 for x in range(N+1)] for x in range(N+1)]
for i in range(M):
    x, y = map(int,input().split())
    L[x][y] += 1
for x in range(N+1):
    for y in range(N):
        L[x][y+1] += L[x][y]  

for y in range(N+1):
    for x in range(N):
        L[x+1][y] += L[x][y]  
for _ in range(Q):
    x, y = map(int, input().split())
    print(L[N][y]-L[x-1][y])
Buggy python submission (verdict: Runtime Error):
L = list(map(int,input().split()))
L = sorted(L)
ans += L[2]-L[1]
ans += L[1]-L[0]
print(ans)

Fixed submission:
L = list(map(int,input().split()))
L = sorted(L)
ans = 0
ans += L[2]-L[1]
ans += L[1]-L[0]
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N,M = map(int,input().split())
L = []
for _ in range(M):
    a,b = map(int,input().split())
    L.append([a,b])
L = sorted(L,key = lambda x:x[1])
cnt = 0
while len(L):
    now = L.pop(0)
    cnt += 1
    while len(L):
        if L[0][0] + 1 <= now[1]  and now[1]  < L[0][1] + 1:
            L.pop(0)
        else:
            break
print(cnt)





Fixed submission:
N,M = map(int,input().split())
L = []
for _ in range(M):
    a,b = map(int,input().split())
    L.append([a,b])
L = sorted(L,key = lambda x:x[1])
cnt = 0
while len(L):
    now = L.pop(0)
    cnt += 1
    while len(L):
        if L[0][0] <= now[1] - 0.5 and now[1] - 0.5  <= L[0][1]:
            L.pop(0)
        else:
            break
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
N,M = map(int,input().split())
L = []
for _ in range(M):
    a,b = map(int,input().split())
    L.append([a,b])
L = sorted(L,key = lambda x:x[1])
cnt = 0
while len(L):
    now = L.pop(0)
    cnt += 1
    while len(L):
        if L[0][0] <= now[1] - 0.5 and now[1] - 0.5  <= L[0][1]:
            L.pop(0)
        else:
            break
print(cnt)





Fixed submission:
N,M = map(int,input().split())
L = []
for _ in range(M):
    a,b = map(int,input().split())
    L.append([a,b])
L = sorted(L,key = lambda x:x[1])
cnt = 0
while len(L):
    now = L.pop(0)
    cnt += 1
    while len(L):
        if L[0][0] <= now[1] - 0.5 and now[1] - 0.5  <= L[0][1]:
            L.pop(0)
        else:
            break
print(cnt)
Buggy python submission (verdict: Runtime Error):
N = int(input())
L = list(map(int,input().split()))
for i in range(N):
    L[i] = L[i] - (i+1)
L = sorted(L)
#print(L)
ans = 0
import statistics 
med = int(statistics.median(L))
#print(med)
for i in range(N):
    ans+=abs(L[i]-med)
print(ans)


Fixed submission:
N = int(input())
L = list(map(int,input().split()))
for i in range(N):
    L[i] = L[i] - (i+1)
L = sorted(L)
#print(L)
ans = 0
n=len(L)
med = int(L[(n+1)//2-1])
#print(med)
for i in range(N):
    ans+=abs(L[i]-med)
print(ans)
Buggy python submission (verdict: Runtime Error):
serch_table = []

for i in range(100):
    for j in range(1,1000):
        x = str(j) + '9'*i
        x = int(x)
        serch_table.append(x)
#print(serch_table)

L = []
for i in serch_table:
    l = [x for x in str(i)]
    x = sum(map(int,l))
    l = [i/x,i]
    L.append(l)
L= sorted(L)
M = []
tmp = -1
for i in L:
    if tmp < i[1]:
        M.append(i[1])
        tmp = i[1]
#print(M,len(serch_table ))
N = int(input())
for i in range(N):
    print(M[i])


Fixed submission:

a=input()
sum=0
for x in a:
    if x=="+":
        sum+=1

print((sum-2)*2)
Buggy python submission (verdict: Runtime Error):
S = input()
K = int(input())
L=set()
for i in range(5):
    for j in range(len(S)-i):
        L.add((S[j:j+i+1]))
L = sorted(list(L))
print(L[K-1])

Fixed submission:
X = int(input())
L=[]
for i in range(2,11):
    for j in range(1001):
        if j**i > 1000:
            break
        if  j**i not  in L:
            L.append(j**i)
L=sorted(L)

if  X not in L:
    L.append(X)
    L=sorted(L)
    n = L.index(X)
    print(L[n-1])
else:
    print(X)
Buggy python submission (verdict: Runtime Error):
N = int(input()) 
prime = [] 
def isprime(n):
    flag = 0
    for i in range(2,int(n**(1/2))+1):
        if n % i == 0:
            flag = 1
            break
    if n == 2:
        flag = 0
    if flag == 0:
        return True
    else:
        return False 
for i in range(1,55556):
    if isprime(i) and i%5==1:
        prime.append(i) 
ans = str(prime[1] )
for i in range(2,N+1):
    ans += " "+str(prime[i] )
print(ans)

Fixed submission:
a,b = map(int,  input().split())
if b >= a:
  print(a)
else:
  print(a-1)

Buggy python submission (verdict: Runtime Error):
N = int(input())
prime = []

def isprime(n):
    flag = 0
    for i in range(2,int(n**(1/2))+1):
        if n % i == 0:
            flag = 1
            break
    if n == 2:
        flag = 0
    if flag == 0:
        return True
    else:
        return False
for i in range(1,55556):
    if isprime(i) and i%5==1:
        prime.append(i)
ans = ""
for i in range(1,N+1):
  ans += prime[i]
print(ans)

Fixed submission:
a,b = map(int,  input().split())
if b >= a:
  print(a)
else:
  print(a-1)
Buggy python submission (verdict: Runtime Error):
L = list(map(int,input().split()))
K = int(input())
m = max(L)
print(L-m + m* (2 ** K))


Fixed submission:
L = [list(map(int,input().split()))]
K = int(input())
import copy

def peice_double(L):
    l = []
    for x in L:
        tmp = copy.copy(x)
        for i in range(3):
            tmp[i] = tmp[i] * 2
            l.append(copy.copy(tmp))
            tmp[i] = tmp[i] // 2
    return l
for i in range(K):
    L = peice_double(L)
ans = 0
for x in L:
    ans = max(ans, sum(x))
print(ans)

Buggy python submission (verdict: Runtime Error):
L = list(map(int,input().split()))
K = int(input())
m = max(L)
print(L-m + m* (2 ** k))


Fixed submission:
L = [list(map(int,input().split()))]
K = int(input())
import copy

def peice_double(L):
    l = []
    for x in L:
        tmp = copy.copy(x)
        for i in range(3):
            tmp[i] = tmp[i] * 2
            l.append(copy.copy(tmp))
            tmp[i] = tmp[i] // 2
    return l
for i in range(K):
    L = peice_double(L)
ans = 0
for x in L:
    ans = max(ans, sum(x))
print(ans)

Buggy python submission (verdict: Runtime Error):
L = list(map(int,input().split()))
K = int(input())
max = max(L)
print(L-max + max* (2 ** k))


Fixed submission:
L = [list(map(int,input().split()))]
K = int(input())
import copy

def peice_double(L):
    l = []
    for x in L:
        tmp = copy.copy(x)
        for i in range(3):
            tmp[i] = tmp[i] * 2
            l.append(copy.copy(tmp))
            tmp[i] = tmp[i] // 2
    return l
for i in range(K):
    L = peice_double(L)
ans = 0
for x in L:
    ans = max(ans, sum(x))
print(ans)

Buggy python submission (verdict: Runtime Error):
L = map(int,input().split())
K = int(input())
max = max(L)
print(L-max + max* (2 ** k))


Fixed submission:
L = [list(map(int,input().split()))]
K = int(input())
import copy

def peice_double(L):
    l = []
    for x in L:
        tmp = copy.copy(x)
        for i in range(3):
            tmp[i] = tmp[i] * 2
            l.append(copy.copy(tmp))
            tmp[i] = tmp[i] // 2
    return l
for i in range(K):
    L = peice_double(L)
ans = 0
for x in L:
    ans = max(ans, sum(x))
print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
prime = []

def isprime(n):
    flag = 0
    for i in range(2,int(n**(1/2))+1):
        if n % i == 0:
            flag = 1
            break
    if n == 2:
        flag = 0
    if flag == 0:
        return True
    else:
        return False
for i in range(1,55556):
    if isprime(i) and i%5==1:
        prime.append(i)
ans = prime[1]
for i in range(2,N+1):
  ans += " "+prime[i] 
print(ans)


Fixed submission:
N = int(input()) 
prime = [] 
def isprime(n):
    flag = 0
    for i in range(2,int(n**(1/2))+1):
        if n % i == 0:
            flag = 1
            break
    if n == 2:
        flag = 0
    if flag == 0:
        return True
    else:
        return False 
for i in range(1,55556):
    if isprime(i) and i%5==1:
        prime.append(i) 
ans = str(prime[1] )
for i in range(2,N+1):
    ans += " "+str(prime[i] )
print(ans)
Buggy python submission (verdict: Runtime Error):
s = input()
for x in s:
  if x == 'o':
    ans += 1
print(700+ans*100)

Fixed submission:
s = input()
ans = 0
for x in s:
  if x == 'o':
    ans += 1
print(700+ans*100)
Buggy python submission (verdict: Runtime Error):
A, B, C, X, Y = map(int,input().split())
value = 0
ans = []
if X > 0 and Y > 0 and A + B > 2*C:
    m = min(X, Y)
    value += m * 2*C
    X = X - m
    Y = Y - m
value += (X * A + Y * B)
ans.append(value)
ans.append(max(X,Y) * 2*C)
print(min(ans))

Fixed submission:
N, X = map(int,input().split())
l = []
for _ in   range(N):
    l.append(int(input()))
X = X - sum(l)
cnt = X // min(l)
print(N+cnt)
Buggy python submission (verdict: Runtime Error):
A, B, K = map(int, input().split())
ans = set()
L = [i for i in range(A, B+1)]
for i in range(K):
  ans.add(L[i])
  ans.add(L[len(L) - 1 - i ])
ans = sorted(list(ans))
for x in ans:
  print(x)

Fixed submission:
A, B, K = map(int, input().split())
ans = []
for i in range(K):
  ans.append(A + i)
for i in range(1,K+1):
  if B-(K-i) not in ans:
    ans.append(B-(K-i))
for x in ans:
  if A <= x and x <= B:
    print(x)

Buggy python submission (verdict: Runtime Error):
A, B, K = map(int, input().split())
ans = set()
L = [i for i in range(A, B+1)]
for i in range(K):
  ans.add(L[i])
  ans.add(L[len(L - 1) - i ])
ans = sorted(list(ans))
for x in ans:
  print(x)

Fixed submission:
A, B, K = map(int, input().split())
ans = []
for i in range(K):
  ans.append(A + i)
for i in range(1,K+1):
  if B-(K-i) not in ans:
    ans.append(B-(K-i))
for x in ans:
  if A <= x and x <= B:
    print(x)
Buggy python submission (verdict: Runtime Error):
A, B, C = map(int, input().split())
cnt = 0
if A % 2 == B % 2 and B % 2 != C % 2:
  A += 1
  B += 1
  cnt += 1
elif A % 2 == C % 2  and C % 2 != B % 2 :
  A += 1
  B += 1
  cnt += 1
elif C % 2 == B % 2 and A % 2 != C %2 :
  C += 1
  B += 1
  cnt += 1
else :
  pass
L = [A, B, C]
L= soreted(L)
cnt += (L[2] - L [1])//2
cnt += (L[2] - L[0])//2
print(cnt)


Fixed submission:
A, B, C = map(int, input().split())
cnt = 0
if A % 2 == B % 2 and B % 2 != C % 2:
  A += 1
  B += 1
  cnt += 1
elif A % 2 == C % 2  and C % 2 != B % 2 :
  A += 1
  C += 1
  cnt += 1
elif C % 2 == B % 2 and A % 2 != C %2 :
  C += 1
  B += 1
  cnt += 1
else :
  pass
L = [A, B, C]
L= sorted(L)
cnt += (L[2] - L [1])//2
cnt += (L[2] - L[0])//2
print(cnt)