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

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

count_list = []



for j in range(2**d):

    total = 0

    count = 0

    for i in range(d):

        if (j >> i) & 1:

            total += 100*(i+1)*q_list[i][0] + q_list[i][1]

            count += q_list[i][0]



    if total >= g:

        count_list.append(count)

        continue



    else:

        for t in range(d):

            digit = str(d)

            if str(format(j, '0'+digit+'b'))[t] == '0':

                for x in range(q_list[d-t-1][0]-1):

                    count += 1

                    total += 100 * (d-t)



                    if total >= g:

                        count_list.append(count)

                        break

                break



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

dic = {}

ans = 9999999

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

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



for i in range(2**d):

    total = 0

    count = 0

    select_list = list(range(1, d+1))

    for j in range(d):

        if (i >> j) & 1:

            num = dic[j+1][0]

            total += 100*(j+1)*num + dic[j+1][1]

            count += dic[j+1][0]

            select_list.remove(j+1)



    if total >= g:

        if count < ans:

            ans = count

            continue

        else:

            continue



    else:

        select = max(select_list)

        select_num = dic[select][0]

        for _ in range(select_num):

            total += 100*select

            count += 1



            if total >= g:

                if count < ans:

                    ans = count

                    break

                else:

                    break



print(ans)

d, g = list(map(int, input().split()))
q_list = [list(map(int, input().split())) for x in range(d)]
count_list = []
for j in range(2**d):
    total = 0
    count = 0
    for i in range(d):
        if (j >> i) & 1:
            total += 100 * (i + 1) * q_list[i][0] + q_list[i][1]
            count += q_list[i][0]
    if total >= g:
        count_list.append(count)
        continue
    else:
        for t in range(d):
            digit = str(d)
            if str(format(j, "0" + digit + "b"))[t] == "0":
                for x in range(q_list[d - t - 1][0] - 1):
                    count += 1
                    total += 100 * (d - t)
                    if total >= g:
                        count_list.append(count)
                        break
                break
print((min(count_list)))

d, g = list(map(int, input().split()))
dic = {}
ans = 9999999
for i in range(1, d + 1):
    dic[i] = list(map(int, input().split()))
for i in range(2**d):
    total = 0
    count = 0
    select_list = list(range(1, d + 1))
    for j in range(d):
        if (i >> j) & 1:
            num = dic[j + 1][0]
            total += 100 * (j + 1) * num + dic[j + 1][1]
            count += dic[j + 1][0]
            select_list.remove(j + 1)
    if total >= g:
        if count < ans:
            ans = count
            continue
        else:
            continue
    else:
        select = max(select_list)
        select_num = dic[select][0]
        for _ in range(select_num):
            total += 100 * select
            count += 1
            if total >= g:
                if count < ans:
                    ans = count
                    break
                else:
                    break
print(ans)

-q_list = [list(map(int, input().split())) for x in range(d)] -count_list = [] -for j in range(2**d): +dic = {} +ans = 9999999 +for i in range(1, d + 1): +    dic[i] = list(map(int, input().split())) +for i in range(2**d): -    for i in range(d): -        if (j >> i) & 1: -            total += 100 * (i + 1) * q_list[i][0] + q_list[i][1] -            count += q_list[i][0] +    select_list = list(range(1, d + 1)) +    for j in range(d): +        if (i >> j) & 1: +            num = dic[j + 1][0] +            total += 100 * (j + 1) * num + dic[j + 1][1] +            count += dic[j + 1][0] +            select_list.remove(j + 1) -        count_list.append(count) -        continue +        if count < ans: +            ans = count +            continue +        else: +            continue -        for t in range(d): -            digit = str(d) -            if str(format(j, "0" + digit + "b"))[t] == "0": -                for x in range(q_list[d - t - 1][0] - 1): -                    count += 1 -                    total += 100 * (d - t) -                    if total >= g: -                        count_list.append(count) -                        break -                break -print((min(count_list))) +        select = max(select_list) +        select_num = dic[select][0] +        for _ in range(select_num): +            total += 100 * select +            count += 1 +            if total >= g: +                if count < ans: +                    ans = count +                    break +                else: +                    break +print(ans)