d,g = list(map(int,input().split()))

p_input = [0]*d

c_input = [0]*d



for i in range(d):

    p_input[i],c_input[i] = list(map(int,input().split()))



ans=float('inf')

for i in range(2**d):

    problem=0

    point=0

    for j in range(d):

        if ((i>>j)&1):

            problem+=p_input[j]

            point+=(1+j)*100*p_input[j]+c_input[j]

    if point>=g:

        ans=min(ans,problem)

    else:

        for j in range(d-1,-1,-1):

            if ((i>>j)&1):

                continue

            for k in range(p_input[j]):

                if point>=g:

                    break

                problem+=1

                point+=100*(j+1)

        ans = min(ans,problem)

            

print(ans)
d,g = list(map(int,input().split()))

P = [0]*d

C = [0]*d

for i in range(d):

    P[i],C[i] = list(map(int,input().split()))



ans = float('inf')

for i in range(2**d):

    tmp = 0

    res = 0

    for j in range(d):

        if ((i>>j)&1):

            tmp+=C[j]+(j+1)*100*P[j]

            res+=P[j]

    if tmp<g:

        for j in range(d-1,-1,-1):

            if not ((i>>j)&1):

                if tmp>=g:

                    break

                if tmp+(j+1)*100*P[j]<=g:

                    tmp+=(j+1)*100*P[j]

                    res+=P[j]

                else:

                    for p in range(P[j]):

                        if tmp>=g:

                            break

                        tmp+=(j+1)*100

                        res+=1

    ans = min(ans,res)

print(ans)
d, g = list(map(int, input().split()))
p_input = [0] * d
c_input = [0] * d
for i in range(d):
    p_input[i], c_input[i] = list(map(int, input().split()))
ans = float("inf")
for i in range(2**d):
    problem = 0
    point = 0
    for j in range(d):
        if (i >> j) & 1:
            problem += p_input[j]
            point += (1 + j) * 100 * p_input[j] + c_input[j]
    if point >= g:
        ans = min(ans, problem)
    else:
        for j in range(d - 1, -1, -1):
            if (i >> j) & 1:
                continue
            for k in range(p_input[j]):
                if point >= g:
                    break
                problem += 1
                point += 100 * (j + 1)
        ans = min(ans, problem)
print(ans)

d, g = list(map(int, input().split()))
P = [0] * d
C = [0] * d
for i in range(d):
    P[i], C[i] = list(map(int, input().split()))
ans = float("inf")
for i in range(2**d):
    tmp = 0
    res = 0
    for j in range(d):
        if (i >> j) & 1:
            tmp += C[j] + (j + 1) * 100 * P[j]
            res += P[j]
    if tmp < g:
        for j in range(d - 1, -1, -1):
            if not ((i >> j) & 1):
                if tmp >= g:
                    break
                if tmp + (j + 1) * 100 * P[j] <= g:
                    tmp += (j + 1) * 100 * P[j]
                    res += P[j]
                else:
                    for p in range(P[j]):
                        if tmp >= g:
                            break
                        tmp += (j + 1) * 100
                        res += 1
    ans = min(ans, res)
print(ans)

-p_input = [0] * d -c_input = [0] * d +P = [0] * d +C = [0] * d -    p_input[i], c_input[i] = list(map(int, input().split())) +    P[i], C[i] = list(map(int, input().split())) -    problem = 0 -    point = 0 +    tmp = 0 +    res = 0 -            problem += p_input[j] -            point += (1 + j) * 100 * p_input[j] + c_input[j] -    if point >= g: -        ans = min(ans, problem) -    else: +            tmp += C[j] + (j + 1) * 100 * P[j] +            res += P[j] +    if tmp < g: -            if (i >> j) & 1: -                continue -            for k in range(p_input[j]): -                if point >= g: +            if not ((i >> j) & 1): +                if tmp >= g: -                problem += 1 -                point += 100 * (j + 1) -        ans = min(ans, problem) +                if tmp + (j + 1) * 100 * P[j] <= g: +                    tmp += (j + 1) * 100 * P[j] +                    res += P[j] +                else: +                    for p in range(P[j]): +                        if tmp >= g: +                            break +                        tmp += (j + 1) * 100 +                        res += 1 +    ans = min(ans, res)