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

pc = [list(map(int, input().split())) for i in range(d)]



min_ac1 = 1000

min_ac2 = 1000

for i in range(2 ** d):

    points = 0

    ac = 0

    for j in range(d):

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

            points += pc[j][0] * 100 * (j + 1) + pc[j][1]

            ac += pc[j][0]

    if points < g:

        l = "{:010b}".format(i)

        l = l[10-d:]

        for k in range(d):

            if l[k] == "0":

                tmp = k

                break

        tmp = -(tmp - d)

        if (g - points + tmp * 100 - 1) // (tmp * 100) < pc[tmp - 1][0]:

            tmp_ac = ac + (g - points + tmp * 100 - 1) // (tmp * 100)

            if tmp_ac < min_ac1:

                min_ac1 = tmp_ac

    if points >= g:

        if ac < min_ac2:

            min_ac2 = ac

    #print(bin(i), ac, points, min_ac1, min_ac2)

print((min(min_ac1, min_ac2)))
def dfs(i, sum, cnt, memo):

    if i == d + 1:

        if sum >= g:

            tmp.append(cnt)

        else:

            cnt += min(p_lst[max(memo) - 1], -(-(g - sum) // (max(memo) * 100)))

            if sum + min(p_lst[max(memo) - 1], -(-(g - sum) // (max(memo) * 100))) * max(memo) * 100 >= g:

                tmp.append(cnt)

        

    else:

        dfs(i + 1, sum + 100 * i * p_lst[i - 1] + c_lst[i - 1], cnt + p_lst[i - 1], memo)

        dfs(i + 1, sum, cnt, memo + [i])



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

p_lst = []

c_lst = []

tmp = []

for i in range(d):

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

    p_lst.append(p)

    c_lst.append(c)





dfs(1, 0, 0, [])

print((min(tmp)))
d, g = list(map(int, input().split()))
pc = [list(map(int, input().split())) for i in range(d)]
min_ac1 = 1000
min_ac2 = 1000
for i in range(2**d):
    points = 0
    ac = 0
    for j in range(d):
        if ((i >> j) & 1) == 1:
            points += pc[j][0] * 100 * (j + 1) + pc[j][1]
            ac += pc[j][0]
    if points < g:
        l = "{:010b}".format(i)
        l = l[10 - d :]
        for k in range(d):
            if l[k] == "0":
                tmp = k
                break
        tmp = -(tmp - d)
        if (g - points + tmp * 100 - 1) // (tmp * 100) < pc[tmp - 1][0]:
            tmp_ac = ac + (g - points + tmp * 100 - 1) // (tmp * 100)
            if tmp_ac < min_ac1:
                min_ac1 = tmp_ac
    if points >= g:
        if ac < min_ac2:
            min_ac2 = ac
    # print(bin(i), ac, points, min_ac1, min_ac2)
print((min(min_ac1, min_ac2)))

def dfs(i, sum, cnt, memo):
    if i == d + 1:
        if sum >= g:
            tmp.append(cnt)
        else:
            cnt += min(p_lst[max(memo) - 1], -(-(g - sum) // (max(memo) * 100)))
            if (
                sum
                + min(p_lst[max(memo) - 1], -(-(g - sum) // (max(memo) * 100)))
                * max(memo)
                * 100
                >= g
            ):
                tmp.append(cnt)
    else:
        dfs(
            i + 1, sum + 100 * i * p_lst[i - 1] + c_lst[i - 1], cnt + p_lst[i - 1], memo
        )
        dfs(i + 1, sum, cnt, memo + [i])


d, g = list(map(int, input().split()))
p_lst = []
c_lst = []
tmp = []
for i in range(d):
    p, c = list(map(int, input().split()))
    p_lst.append(p)
    c_lst.append(c)
dfs(1, 0, 0, [])
print((min(tmp)))

+def dfs(i, sum, cnt, memo): +    if i == d + 1: +        if sum >= g: +            tmp.append(cnt) +        else: +            cnt += min(p_lst[max(memo) - 1], -(-(g - sum) // (max(memo) * 100))) +            if ( +                sum +                + min(p_lst[max(memo) - 1], -(-(g - sum) // (max(memo) * 100))) +                * max(memo) +                * 100 +                >= g +            ): +                tmp.append(cnt) +    else: +        dfs( +            i + 1, sum + 100 * i * p_lst[i - 1] + c_lst[i - 1], cnt + p_lst[i - 1], memo +        ) +        dfs(i + 1, sum, cnt, memo + [i]) + + -pc = [list(map(int, input().split())) for i in range(d)] -min_ac1 = 1000 -min_ac2 = 1000 -for i in range(2**d): -    points = 0 -    ac = 0 -    for j in range(d): -        if ((i >> j) & 1) == 1: -            points += pc[j][0] * 100 * (j + 1) + pc[j][1] -            ac += pc[j][0] -    if points < g: -        l = "{:010b}".format(i) -        l = l[10 - d :] -        for k in range(d): -            if l[k] == "0": -                tmp = k -                break -        tmp = -(tmp - d) -        if (g - points + tmp * 100 - 1) // (tmp * 100) < pc[tmp - 1][0]: -            tmp_ac = ac + (g - points + tmp * 100 - 1) // (tmp * 100) -            if tmp_ac < min_ac1: -                min_ac1 = tmp_ac -    if points >= g: -        if ac < min_ac2: -            min_ac2 = ac -    # print(bin(i), ac, points, min_ac1, min_ac2) -print((min(min_ac1, min_ac2))) +p_lst = [] +c_lst = [] +tmp = [] +for i in range(d): +    p, c = list(map(int, input().split())) +    p_lst.append(p) +    c_lst.append(c) +dfs(1, 0, 0, []) +print((min(tmp)))