Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
n = int(input())
ans = 0
for i in range(1, N+1):
    if int(i * 1.08) == n:
        ans = i

if ans == 0:
    print(":(")
else:
    print(x)

Fixed submission:
n = int(input())
ans = 0
for i in range(1, n+1):
    if int(i * 1.08) == n:
        ans = i

if ans == 0:
    print(":(")
else:
    print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
S = [0] * (10 ** 5)
for i,a in enumerate(A):
    S[a] = i + 1
    # print(A[i] + 1)
    # print(a)

for n in range(1,N + 1):
    if n == N + 1 or n == N:
        print(S[n])
    else:
        print(S[n],end=" ")




Fixed submission:
N = int(input())
A = list(map(int,input().split()))
S = [0] * (10 ** 5 + 2)
for i,a in enumerate(A):
    S[a] = i + 1
    # print(A[i] + 1)
    # print(a)

for n in range(1,N + 1):
    if n == N + 1 or n == N:
        print(S[n])
    else:
        print(S[n],end=" ")

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
S = [0] * (10 ** 5)
for i,a in enumerate(A):
    S[a] = i + 1
    # print(A[i] + 1)
    # print(a)

for n in range(N + 1):
    if n != 0:
        print(S[n],end=" ")
        

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
S = [0] * (10 ** 5 + 2)
for i,a in enumerate(A):
    S[a] = i + 1
    # print(A[i] + 1)
    # print(a)

for n in range(1,N + 1):
    if n == N + 1 or n == N:
        print(S[n])
    else:
        print(S[n],end=" ")
Buggy python submission (verdict: Time Limit Exceeded):
import copy
N = int(input())
A = []
for i in range(N):
    A.append(int(input()))
c = []
mL = 0
mR = 0
# m = 0
m = max(A)
S = copy.copy(A)
for s in S:
    if s == m:
        S.remove(s)
    # print(S[i])
s = max(S)    
# print(s)
for i, a in enumerate(A):
    # print(a)
    if a == m:
        print(s)
    else:
        print(m)
    # if i == 0:
    #     mR = max(A[i + 1 :])
    #     print(mR)
    # elif i == len(A) - 1:
    #     mL = max(A[0: i])
    #     print(mL)
    # else:
    #     mL = max(A[0: i])
    #     mR = max(A[i + 1 :])
    #     m = max(mL, mR)
    #     print(m)
    

Fixed submission:
import copy
N = int(input())
A = []
m = 0
S = 0
for i in range(N):
    a = int(input())
    A.append(a)
    if m < a:
        s = m
        m = a
    elif s < a:
        s = a

c = []
mL = 0
mR = 0
# m = 0


for i, a in enumerate(A):
    # print(a)
    if a == m:
        print(s)
    else:
        print(m)
    # if i == 0:
    #     mR = max(A[i + 1 :])
    #     print(mR)
    # elif i == len(A) - 1:
    #     mL = max(A[0: i])
    #     print(mL)
    # else:
    #     mL = max(A[0: i])
    #     mR = max(A[i + 1 :])
    #     m = max(mL, mR)
    #     print(m)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = []
for i in range(N):
    A.append(int(input()))
c = []
mL = 0
mR = 0
m = 0
for i,a in enumerate(A):
    if i == 0:
        mR = max(A[i + 1 :])
        print(mR)
    elif i == len(A) - 1:
        mL = max(A[0: i])
        print(mL)
    else:
        mL = max(A[0: i])
        mR = max(A[i + 1 :])
        m = max(mL, mR)
        print(m)
    

Fixed submission:
import copy
N = int(input())
A = []
m = 0
S = 0
for i in range(N):
    a = int(input())
    A.append(a)
    if m < a:
        s = m
        m = a
    elif s < a:
        s = a

c = []
mL = 0
mR = 0
# m = 0


for i, a in enumerate(A):
    # print(a)
    if a == m:
        print(s)
    else:
        print(m)
    # if i == 0:
    #     mR = max(A[i + 1 :])
    #     print(mR)
    # elif i == len(A) - 1:
    #     mL = max(A[0: i])
    #     print(mL)
    # else:
    #     mL = max(A[0: i])
    #     mR = max(A[i + 1 :])
    #     m = max(mL, mR)
    #     print(m)
Buggy python submission (verdict: Runtime Error):
Thank you for your comment.
When I run the above code, it just displays the text "Loading...." and doesn't jump to the "login" or "home" page.
I'm not sure which part of the code is the cause, but I'm wondering if initState wasn't called

Fixed submission:
import math
N,D = map(int,input().split())
X = []
c = 0
s = 0
for i in range(N):
    X.append(list(map(int,input().split()))) 
for l in range(N):
    # print(str(l) + "l")
    if l == N - 1:
        break
    for i in range(l+1,N):
        for j in range(D):
            s += abs(X[l][j] - X[i][j]) ** 2
        s = math.sqrt(s)
        if s % 1 == 0:
            c += 1
        # print(str(i) + "i")
        s = 0

print(c)
Buggy python submission (verdict: Runtime Error):
import math
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

def roundup(n):
    return int(math.ceil(n /10)) * 10
def get_digit(number):
    return number % 10   
s = 0
m = []
li = [A, B, C, D, E]
for i in range(len(li)):
    if get_digit(li[i]) >= 1:
        m.append(get_digit(li[i]))
f = False
        
for l in range(len(li)):
    if min(m) == get_digit(li[l]) and f == False:
        s += li[l]
        f = True
    else:
        s += roundup(li[l])
print(s)

Fixed submission:
import math
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

def roundup(n):
    return int(math.ceil(n /10)) * 10
def get_digit(number):
    return number % 10   
s = 0
m = []
li = [A, B, C, D, E]
for i in range(len(li)):
    if get_digit(li[i]) >= 1:
        m.append(get_digit(li[i]))
f = False
m.sort()        
for l in range(len(li)):
    if len(m) > 0:
        if m[0] == get_digit(li[l]) and f == False:
            s += li[l]
            f = True
        else:
            s += roundup(li[l])
            # print(roundup(li[l]))
    else:
        s =sum(li)
print(s)

Buggy python submission (verdict: Runtime Error):
import math
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

def roundup(n):
    return int(math.ceil(n /10)) * 10
def get_digit(number):
    return number // 10**0 % 10   
s = 0
m = []
li = [A, B, C, D, E]
for i in range(len(li)):
    if get_digit(li[i]) >= 1:
        m.append(get_digit(li[i]))
f = False
        
for l in range(len(li)):
    if min(m) == get_digit(li[l]) and f == False:
        s += li[l]
        f = True
    else:
        s += roundup(li[l])
print(s)

Fixed submission:
import math
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

def roundup(n):
    return int(math.ceil(n /10)) * 10
def get_digit(number):
    return number % 10   
s = 0
m = []
li = [A, B, C, D, E]
for i in range(len(li)):
    if get_digit(li[i]) >= 1:
        m.append(get_digit(li[i]))
f = False
m.sort()        
for l in range(len(li)):
    if len(m) > 0:
        if m[0] == get_digit(li[l]) and f == False:
            s += li[l]
            f = True
        else:
            s += roundup(li[l])
            # print(roundup(li[l]))
    else:
        s =sum(li)
print(s)
Buggy python submission (verdict: Runtime Error):
N.M = map(int,input().split())
C = [0] * (M+1)
for i in range(N):
    K = list(map(int, input().split()))
    for k in range(len(k)):
        C[K[k]] += 1
count = 0

for c in C:
    if c == N:
        count += 1

print(count)

Fixed submission:
N,M = map(int,input().split())
C = [0] * (M+1)
for i in range(N):
    K = list(map(int, input().split()))
    for k in range(len(K)):
        if k != 0:
            C[K[k]] += 1
count = 0

for c in C:
    if c == N:
        count += 1

print(count)
Buggy python submission (verdict: Runtime Error):
n1 = int(input())
n2 = int(input())

s = n1 * n2

if s % 2 == 0:
    print("Even")
else:
    print("Odd")


Fixed submission:
a, b = map(int, input().split())
if (a*b)%2 ==0:
    print('Even')
else:
    print('Odd')
Buggy python submission (verdict: Runtime Error):
n = input()
li = list(map(int, input().split()))
count = 0


#all 全ての要素がTrueならTrue
while all(a % 2 == 0 for a in li):
    li = [ a / 2 for a in li]
    count += 1
# a,b = map(int, input().split())
print(count)

Fixed submission:
print(input().count("1"))
Buggy python submission (verdict: Time Limit Exceeded):
n = input()
li = list(map(int, input().split()))
count = 0

while(a % 2 == 0 for a in li):
    li = [ a / 2 for a in li]
    count += 1
# a,b = map(int, input().split())
print(count)

Fixed submission:
n = input()
li = list(map(int, input().split()))
count = 0


#all 全ての要素がTrueならTrue
while all(a % 2 == 0 for a in li):
    li = [ a / 2 for a in li]
    count += 1
# a,b = map(int, input().split())
print(count)
Buggy python submission (verdict: Runtime Error):
N = int(input())
l = 2
l2 = 1

for i in range(N - 1):
    if i % 2 == 0:
        l = l + l2
    else:
        l2 = l + l2
    
if i % 2 == 1:
    print(l2)
else:
    print(l)

Fixed submission:
N = int(input())
l = 2
l2 = 1

if N == 1:
    print(l2)
    exit()

for i in range(N - 1):
    if i % 2 == 0:
        l = l + l2
    else:
        l2 = l + l2
    
if i % 2 == 1:
    print(l2)
else:
    print(l)

Buggy python submission (verdict: Runtime Error):
N = int(input())
l = 2
l2 = 1

for i in range(N - 1):
    if i % 2 == 0:
        l = l + l2
    else:
        l2 = l + l2
    
if i % 2 == 1:
    print(l2)
else:
    print(l)

Fixed submission:
N = int(input())
l = 2
l2 = 1

if N == 1:
    print(l2)
    exit()

for i in range(N - 1):
    if i % 2 == 0:
        l = l + l2
    else:
        l2 = l + l2
    
if i % 2 == 1:
    print(l2)
else:
    print(l)
Buggy python submission (verdict: Runtime Error):
w = input()
A = [0] * 26

for in in w:
    A[ord(i) - 97] += 1

flag = True
for a in A:
    if a % 2 == 1:
        flag = False


if flag == False:
    print("No")
else:
    print("Yes")

Fixed submission:
w = input()
A = [0] * 26

for i in w:
    A[ord(i) - 97] += 1

flag = True
for a in A:
    if a % 2 == 1:
        flag = False


if flag == False:
    print("No")
else:
    print("Yes")
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
ans = 0
mod = 10**9 + 7

for i in range(n):
    ans += (a[i] * sum(a[i+1:]))
print(ans%mod)


Fixed submission:
n = int(input())
a = list(map(int, input().split()))
sum_a = sum(a)
ans = 0
mod = 10**9 + 7

for i in range(n):
    sum_a -= a[i]
    ans += a[i] * sum_a
    ans %= mod
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
A = list(map(int, input().split()))

pre = 1
for i in range(k):
    pre *= A[i]

def prod(i, k, pre):
    now = pre / A[i-k-1] * A[i-1]
    return now

for i in range(k+1, n+1):
    now = prod(i, k, pre)
    if now <= pre:
        print('No')
    else:
        print('Yes')
    pre = now


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: Time Limit Exceeded):
n, k = map(int, input().split())
A = list(map(int, input().split()))

pre = 1
for i in range(k):
    pre *= A[i]

def prod(i, k):
    ret = 1
    for j in range(i-k, i):
        ret *= A[j]
    return ret

for i in range(k+1, n+1):
    now = prod(i, k)
    if now <= pre:
        print('No')
    else:
        print('Yes')
    pre = now


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: Time Limit Exceeded):
n = int(input())
A = list(map(int, input().split()))
A.sort()

memo = [0] * n

for i in range(n):
    for j in range(n):
        if memo[j] or i == j:
            continue
        if A[j]%A[i] == 0 and A[j] >= A[i]:
            memo[j] = 1

print(n - sum(memo))


Fixed submission:
from collections import Counter

n = int(input())
A = list(map(int, input().split()))
A.sort()
lim = A[-1]+1
B = [0] * lim
U = list(set(A))
C = Counter(A)

for a in U:
    if C[a] > 1:
        B[a] = 1
    for i in range(a*2, lim, a):
        B[i] = 1

ans = 0
for a in A:
    if B[a] == 0:
        ans += 1

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
k = int(input())
a = []

def gcd(a,b):
    if a % b == 0:
      return b
    return gcd(b, a%b)

for i in range(1, k+1):
    for j in range(1, k+1):
        x = gcd(i, j)
        for l in range(1, k+1):
            y = gcd(l, x)
            a.append(y)
print(sum(a))

Fixed submission:
import math
k = int(input())
a = []
for i in range(1, k+1):
    for j in range(1, k+1):
        x = math.gcd(i, j)
        for l in range(1, k+1):
            y = math.gcd(l, x)
            a.append(y)
print(sum(a))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
ans = 0

def gcd(a,b):
    if a % b == 0:
      return b
    return gcd(b, a%b)

for i in range(1, n+1):
    for j in range(1, n+1):
        x = gcd(i, j)
        for k in range(1, n+1):
            ans += gcd(x, k)
print(ans)


Fixed submission:
import math
k = int(input())
a = []
for i in range(1, k+1):
    for j in range(1, k+1):
        x = math.gcd(i, j)
        for l in range(1, k+1):
            y = math.gcd(l, x)
            a.append(y)
print(sum(a))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
ans = 0

def gcd(a,b):
    if a % b == 0:
      return b
    return gcd(b, a%b)

for i in range(1, n+1):
    for j in range(1, n+1):
        for k in range(1, n+1):
            g = gcd(i, j)
            ans += gcd(g, k)
print(ans)

Fixed submission:
import math
k = int(input())
a = []
for i in range(1, k+1):
    for j in range(1, k+1):
        x = math.gcd(i, j)
        for l in range(1, k+1):
            y = math.gcd(l, x)
            a.append(y)
print(sum(a))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = [int(input()) for i in range(n)]
for i in range(n):
    tmp = a[:]
    tmp.pop(i)
    tmp.sort()
    print(tmp[-1])

Fixed submission:
n = int(input())
a = [int(input()) for i in range(n)]
sa = sorted(a)
maxi = sa.count(sa[-1])
ans = sa[-1]
max_index = a.index(sa[-1])
if maxi == 1:
    for i in range(n):
        if i == max_index:
            print(sa[-2])
        else:
            print(ans)
else:
    for i in range(n):
        print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = [int(input()) for i in range(n)]
for i in range(n):
    if i == 0:
        print(max(a[1:]))
    elif i == n-1:
        print(max(a[:n-1]))
    else:
        print(max(max(a[0:i]), max(a[i+1:])))

Fixed submission:
n = int(input())
a = [int(input()) for i in range(n)]
sa = sorted(a)
maxi = sa.count(sa[-1])
ans = sa[-1]
max_index = a.index(sa[-1])
if maxi == 1:
    for i in range(n):
        if i == max_index:
            print(sa[-2])
        else:
            print(ans)
else:
    for i in range(n):
        print(ans)
Buggy python submission (verdict: Runtime Error):
import sys
import collections
input = sys.stdin.readline
n = int(input())
xy = []
for i in range(n):
    _a,_b = map(int,input().split())
    xy.append([_a,_b])
sxy = sorted(xy)
sxy2 = []
for i in range(1,n):
    sxy2.append(((sxy[i][0]-sxy[i-1][0])**2)+((sxy[i][1]-sxy[i-1][1])**2))
c = collections.Counter(sxy2)
ans = len(sxy2)-max(c.values())+1
print(ans) if ans != 0 else print(1)


Fixed submission:
import sys
input = sys.stdin.readline
n = int(input())
b = sorted([list(map(int,input().split())) for i in range(n)])
d = {}
for i in range(n):
    for j in range(i+1,n):
        x = (b[j][0]-b[i][0],b[j][1]-b[i][1])
        if x in d:
            d[x]+=1
        else:
            d[x]=1
if n==1:
    print(1)
else:
    print(n-max(d.values()))

Buggy python submission (verdict: Runtime Error):
import sys
import collections
input = sys.stdin.readline
n = int(input())
xy = []
for i in range(n):
    _a,_b = map(int,input().split())
    xy.append([_a,_b])
sxy = sorted(xy)
sxy2 = []
for i in range(1,n):
    sxy2.append(((sxy[i][0]-sxy[i-1][0])**2)+((sxy[i][1]-sxy[i-1][1])**2))
c = collections.Counter(sxy2)
ans = len(sxy2)+1-max(c.values())
print(ans) if ans != 0 else print(1)


Fixed submission:
import sys
input = sys.stdin.readline
n = int(input())
b = sorted([list(map(int,input().split())) for i in range(n)])
d = {}
for i in range(n):
    for j in range(i+1,n):
        x = (b[j][0]-b[i][0],b[j][1]-b[i][1])
        if x in d:
            d[x]+=1
        else:
            d[x]=1
if n==1:
    print(1)
else:
    print(n-max(d.values()))

Buggy python submission (verdict: Runtime Error):
import sys
import collections
input = sys.stdin.readline
n = int(input())
xy = []
for i in range(n):
    _a,_b = map(int,input().split())
    xy.append([_a,_b])
sxy = sorted(xy)
sxy2 = []
for i in range(1,n):
    sxy2.append(((sxy[i][0]-sxy[i-1][0])**2)+((sxy[i][1]-sxy[i-1][1])**2))
c = collections.Counter(sxy2)
print(len(sxy2)-max(c.values()) + 1)


Fixed submission:
import sys
input = sys.stdin.readline
n = int(input())
b = sorted([list(map(int,input().split())) for i in range(n)])
d = {}
for i in range(n):
    for j in range(i+1,n):
        x = (b[j][0]-b[i][0],b[j][1]-b[i][1])
        if x in d:
            d[x]+=1
        else:
            d[x]=1
if n==1:
    print(1)
else:
    print(n-max(d.values()))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = [int(input()) for i in range(5)]
m = [n,0,0,0,0,0]
cnt = 0
while sum(m[0:5]):
    if cnt>=4 and m[4]-l[4]>0:
        m[4]-=l[4]
        m[5]+=l[4]
    elif cnt>=4 and not(m[4]-l[4]>0):
        m[5]+=m[4]
        m[4]=0
    if cnt>=3 and m[3]-l[3]>0:
        m[3]-=l[3]
        m[4]+=l[3]
    elif cnt>=3 and not(m[3]-l[3]>0):
        m[4]+=m[3]
        m[3]=0
    if cnt>=2 and m[2]-l[2]>0:
        m[2]-=l[2]
        m[3]+=l[2]
    elif cnt>=2 and not(m[2]-l[2]>0):
        m[3]+=m[2]
        m[2]=0
    if cnt>=1 and m[1]-l[1]>0:
        m[1]-=l[1]
        m[2]+=l[1]
    elif cnt>=1 and not(m[1]-l[1]>0):
        m[2]+=m[1]
        m[1]=0
    if cnt>=0 and m[0]-l[0]>0:
        m[0]-=l[0]
        m[1]+=l[0]
    elif cnt>=0 and not(m[0]-l[0]>0):
        m[1]+=m[0]
        m[0]=0
    cnt+=1
print(cnt)

Fixed submission:
n = int(input())
l = [int(input()) for i in range(5)]
r = min(l)
h = -(-n//r)
print(4+h)
Buggy python submission (verdict: Runtime Error):
s = list(input())
acgt = ['A','C','G','T']
tmp = ''
ans = []
for i in range(len(s)):
    if s[i] in acgt:
        tmp+=s[i]
    else:
        ans.append(tmp)
        tmp = ''
if max(ans)==0:
    print(0)
else:
    print(len(max(ans)))


Fixed submission:
s = input()
acgt = ['A','C','G','T']
cnt = 0
ans = 0
for i in range(len(s)):
    if s[i] in acgt:
        cnt+=1
    else:
        ans = max(ans,cnt)
        cnt = 0
ans = max(ans,cnt)
print(ans)

Buggy python submission (verdict: Runtime Error):
s = list(input())
acgt = ['A','C','G','T']
tmp = ''
ans = []
for i in range(len(s)):
    if s[i] in acgt:
        tmp+=s[i]
    else:
        ans.append(tmp)
        tmp = ''
print(len(max(ans)))


Fixed submission:
s = input()
acgt = ['A','C','G','T']
cnt = 0
ans = 0
for i in range(len(s)):
    if s[i] in acgt:
        cnt+=1
    else:
        ans = max(ans,cnt)
        cnt = 0
ans = max(ans,cnt)
print(ans)

Buggy python submission (verdict: Runtime Error):
s = list(input())
acgt = ['A','C','G','T']
tmp = ''
ans = []
for i in range(len(s)):
    if s[i] in acgt:
        tmp+=s[i]
    else:
        ans.append(tmp)
        tmp = ''
print(len(max(ans)))


Fixed submission:
s = input()
acgt = ['A','C','G','T']
cnt = 0
ans = 0
for i in range(len(s)):
    if s[i] in acgt:
        cnt+=1
    else:
        ans = max(ans,cnt)
        cnt = 0
ans = max(ans,cnt)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline
s = list(input())
ans = 0
s.append('n')
while 'n' in s:
    s = [i for i in s if i != 'n']
    for i in range(len(s)):
        if s[i:i+2]==['1', '0'] or s[i:i+2]==['0', '1']:
            ans += 2
            s[i:i+2] = ['n','n']
print(ans)


Fixed submission:
s = input()
zero = 0
one = 0
for i in range(len(s)):
    if s[i]=='0':
        zero+=1
    else:
        one+=1
print(2*(min(zero,one)))
Buggy python submission (verdict: Time Limit Exceeded):
d, g = map(int, input().split())
pc = []
for _ in range(d):
    _p, _c = map(int, input().split())
    pc.append([_p, _c])
p = sum([i[0] for i in pc])
score = []
for i in range(len(pc)):
    for j in range(pc[i][0]):
        score.append((i+1)*100)
answer = 10000
for i in range(2 ** p):
    tmp = []
    ans = 0
    for j in range(p):
        if ((i >> j) & 1):
            tmp.append(j)
    for j in tmp:
        ans += score[j]
    for j in range(len(pc)):
        if j == 0:
            l = [_ for _ in tmp if 0 <= _ < pc[0][0]]
            if len(l) == pc[0][0]:
                ans += pc[0][1]
        elif j == len(pc)-1:
            s = score.index((j+1)*100)
            l = [_ for _ in tmp if s <= _]
            if len(l) == pc[-1][0]:
                ans += pc[-1][1]
        else:
            s = score.index((j+1)*100)
            e = score.index((j+1)*100) - 1
            l = [_ for _ in tmp if s <= _ <= e]
            if len(l) == pc[j][0]:
                ans += pc[j][1]
    if ans >= g:
        if answer > len(tmp):
            answer = len(tmp)
print(answer)

Fixed submission:
d, g = map(int, input().split())
pc = []
a = 9999999
for _ in range(d):
    _p, _c = map(int, input().split())
    pc.append([_p, _c])
for i in range(2 ** d):
    tmp = []
    ans = 0
    n = 0
    for j in range(d):
        if ((i >> j) & 1):
            tmp.append(j)
    for j in tmp:
        ans += (j+1)*100*pc[j][0] + pc[j][1]
        n += pc[j][0]
    if ans >= g:
        if n < a:
            a = n
    else:
        for j in range(len(pc)):
            if not j in tmp:
                plus = 0
                for k in range(pc[j][0]):
                    plus += (j+1)*100
                    if ans + plus >= g:
                        if n + k + 1 < a:
                            ans += plus
                            n += k+1
                            a = n
                            break
print(a)
Buggy python submission (verdict: Runtime Error):
n = int(input())
s = list(input())
ans = [i * 0 for i in range(51)]
if n == 2:
    ans.clear()
    if s[0] == s[1]:
        ans.append(1)
    else:
        ans.append(0)
else:
    for i in range(n-1):
        tmp1 = list(set(s[:i+1]))
        tmp2 = list(set(s[i:]))
        for j in range(len(tmp1)):
            if tmp1[j] in tmp2:
                ans[i] += 1
print(max(ans))


Fixed submission:
n = int(input())
s = list(input())
ans = [i * 0 for i in range(100)]
if n == 2:
    ans.clear()
    if s[0] == s[1]:
        ans.append(1)
    else:
        ans.append(0)
else:
    for i in range(0,n-1):
        tmp1 = list(set(s[:i]))
        tmp2 = list(set(s[i:]))
        for j in range(len(tmp1)):
            if tmp1[j] in tmp2:
                ans[i] += 1
print(max(ans))

Buggy python submission (verdict: Runtime Error):
n = int(input())
s = list(input())
ans = [i * 0 for i in range(51)]
for i in range(n-1):
    tmp1 = list(set(s[:i+1]))
    tmp2 = list(set(s[i:]))
    for j in range(len(tmp1)):
        if tmp1[j] in tmp2:
            ans[i] += 1
print(max(ans))


Fixed submission:
n = int(input())
s = list(input())
ans = [i * 0 for i in range(100)]
if n == 2:
    ans.clear()
    if s[0] == s[1]:
        ans.append(1)
    else:
        ans.append(0)
else:
    for i in range(0,n-1):
        tmp1 = list(set(s[:i]))
        tmp2 = list(set(s[i:]))
        for j in range(len(tmp1)):
            if tmp1[j] in tmp2:
                ans[i] += 1
print(max(ans))

Buggy python submission (verdict: Runtime Error):
n = int(input())
s = list(input())
ans = [i * 0 for i in range(51)]
for i in range(n-1):
    tmp1 = list(set(s[:i+1]))
    tmp2 = list(set(s[i:]))
    for j in range(len(tmp1)):
        if tmp1[j] in tmp2:
            ans[i] += 1
print(max(ans))


Fixed submission:
n = int(input())
s = list(input())
ans = [i * 0 for i in range(100)]
if n == 2:
    ans.clear()
    if s[0] == s[1]:
        ans.append(1)
    else:
        ans.append(0)
else:
    for i in range(0,n-1):
        tmp1 = list(set(s[:i]))
        tmp2 = list(set(s[i:]))
        for j in range(len(tmp1)):
            if tmp1[j] in tmp2:
                ans[i] += 1
print(max(ans))