D,G = list(map(int,input().split()))

P = []

num_p = 0

for i in range(1,D+1):

    p,c = list(map(int,input().split()))

    num_p += p

    for j in range(1,p+1):

        P += [(j,i*100*j+c*(j==p))]

dp = [0]*(num_p+1)

for k,pt in P:

    if k==1:

        t_dp = dp[:]

    for cur in range(1,num_p+1):

        if cur>=k:

            dp[cur] = max(dp[cur], t_dp[cur-k]+pt)

for i in range(num_p+1):

    if dp[i]>=G:

        print(i)

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

pc = [list(map(int,input().split()))for _ in[0]*d]

ans = []

for mask in range(1 << d):

    s = 0

    num = 0

    rest_max = -1

    for i in range(d):

        p,c = pc[i]

        if mask >> i & 1:

            s += p * 100 * (i + 1) + c

            num += p

        else:

            rest_max = i

    if s < g:

        s1 = 100 * (rest_max + 1)

        need = (g - s + s1 - 1) // s1

        if need >= pc[rest_max][0]:

            continue

        num += need

    ans.append(num)

print((min(ans)))
D, G = list(map(int, input().split()))
P = []
num_p = 0
for i in range(1, D + 1):
    p, c = list(map(int, input().split()))
    num_p += p
    for j in range(1, p + 1):
        P += [(j, i * 100 * j + c * (j == p))]
dp = [0] * (num_p + 1)
for k, pt in P:
    if k == 1:
        t_dp = dp[:]
    for cur in range(1, num_p + 1):
        if cur >= k:
            dp[cur] = max(dp[cur], t_dp[cur - k] + pt)
for i in range(num_p + 1):
    if dp[i] >= G:
        print(i)
        break

d, g = list(map(int, input().split()))
pc = [list(map(int, input().split())) for _ in [0] * d]
ans = []
for mask in range(1 << d):
    s = 0
    num = 0
    rest_max = -1
    for i in range(d):
        p, c = pc[i]
        if mask >> i & 1:
            s += p * 100 * (i + 1) + c
            num += p
        else:
            rest_max = i
    if s < g:
        s1 = 100 * (rest_max + 1)
        need = (g - s + s1 - 1) // s1
        if need >= pc[rest_max][0]:
            continue
        num += need
    ans.append(num)
print((min(ans)))

-D, G = list(map(int, input().split())) -P = [] -num_p = 0 -for i in range(1, D + 1): -    p, c = list(map(int, input().split())) -    num_p += p -    for j in range(1, p + 1): -        P += [(j, i * 100 * j + c * (j == p))] -dp = [0] * (num_p + 1) -for k, pt in P: -    if k == 1: -        t_dp = dp[:] -    for cur in range(1, num_p + 1): -        if cur >= k: -            dp[cur] = max(dp[cur], t_dp[cur - k] + pt) -for i in range(num_p + 1): -    if dp[i] >= G: -        print(i) -        break +d, g = list(map(int, input().split())) +pc = [list(map(int, input().split())) for _ in [0] * d] +ans = [] +for mask in range(1 << d): +    s = 0 +    num = 0 +    rest_max = -1 +    for i in range(d): +        p, c = pc[i] +        if mask >> i & 1: +            s += p * 100 * (i + 1) + c +            num += p +        else: +            rest_max = i +    if s < g: +        s1 = 100 * (rest_max + 1) +        need = (g - s + s1 - 1) // s1 +        if need >= pc[rest_max][0]: +            continue +        num += need +    ans.append(num) +print((min(ans)))