import itertools

from collections import Counter

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

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

min_num = 10**8



judge_list = list(itertools.product([0, 1, 2], repeat=D)) #0:中途半端に解く 1:一問も解かない 2: 全部解く





for judge in judge_list:

    score = 0

    num = 0

    d = Counter() #インスタンスを生成

    d.update(judge)

    if (d[0] <= 1):

        for i in range(1, len(judge) + 1):

            if score >= G:

                break



            if judge[-i] == 1:

                pass



            if judge[-i] == 2:

                score += P[-i][0] * (D - i + 1) * 100 + P[-i][1]

                num += P[-i][0]



            if (judge[-i] == 0):

                for j in range(P[-i][0]):

                    if score >= G:

                        break

                    score += 100 * (D - i + 1)

                    num += 1



        if score >= G:

            min_num = min(num, min_num)



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

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

P=list([x[0] for x in ls])

C=list([x[1] for x in ls])



tmp=10**9

for i in range(1<<d):

  total=0

  num=0

  for j in range(d):

    if (i>>j)&1:

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

      num+=P[j]

  if total>=g:

    tmp=min(num,tmp)

  else:

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

      if (i>>j)&1:

        continue

      for k in range(P[j]):

        if total>=g:

          break

        total+=100*(j+1)

        num+=1

    tmp=min(tmp,num)

print(tmp)
import itertools
from collections import Counter

D, G = list(map(int, input().split()))
P = [list(map(int, input().split())) for i in range(D)]
min_num = 10**8
judge_list = list(itertools.product([0, 1, 2], repeat=D))  # 0:中途半端に解く 1:一問も解かない 2: 全部解く
for judge in judge_list:
    score = 0
    num = 0
    d = Counter()  # インスタンスを生成
    d.update(judge)
    if d[0] <= 1:
        for i in range(1, len(judge) + 1):
            if score >= G:
                break
            if judge[-i] == 1:
                pass
            if judge[-i] == 2:
                score += P[-i][0] * (D - i + 1) * 100 + P[-i][1]
                num += P[-i][0]
            if judge[-i] == 0:
                for j in range(P[-i][0]):
                    if score >= G:
                        break
                    score += 100 * (D - i + 1)
                    num += 1
        if score >= G:
            min_num = min(num, min_num)
print(min_num)

d, g = list(map(int, input().split()))
ls = [list(map(int, input().split())) for i in range(d)]
P = list([x[0] for x in ls])
C = list([x[1] for x in ls])
tmp = 10**9
for i in range(1 << d):
    total = 0
    num = 0
    for j in range(d):
        if (i >> j) & 1:
            total += C[j] + P[j] * 100 * (j + 1)
            num += P[j]
    if total >= g:
        tmp = min(num, tmp)
    else:
        for j in range(d - 1, -1, -1):
            if (i >> j) & 1:
                continue
            for k in range(P[j]):
                if total >= g:
                    break
                total += 100 * (j + 1)
                num += 1
        tmp = min(tmp, num)
print(tmp)

-import itertools -from collections import Counter - -D, G = list(map(int, input().split())) -P = [list(map(int, input().split())) for i in range(D)] -min_num = 10**8 -judge_list = list(itertools.product([0, 1, 2], repeat=D))  # 0:中途半端に解く 1:一問も解かない 2: 全部解く -for judge in judge_list: -    score = 0 +d, g = list(map(int, input().split())) +ls = [list(map(int, input().split())) for i in range(d)] +P = list([x[0] for x in ls]) +C = list([x[1] for x in ls]) +tmp = 10**9 +for i in range(1 << d): +    total = 0 -    d = Counter()  # インスタンスを生成 -    d.update(judge) -    if d[0] <= 1: -        for i in range(1, len(judge) + 1): -            if score >= G: -                break -            if judge[-i] == 1: -                pass -            if judge[-i] == 2: -                score += P[-i][0] * (D - i + 1) * 100 + P[-i][1] -                num += P[-i][0] -            if judge[-i] == 0: -                for j in range(P[-i][0]): -                    if score >= G: -                        break -                    score += 100 * (D - i + 1) -                    num += 1 -        if score >= G: -            min_num = min(num, min_num) -print(min_num) +    for j in range(d): +        if (i >> j) & 1: +            total += C[j] + P[j] * 100 * (j + 1) +            num += P[j] +    if total >= g: +        tmp = min(num, tmp) +    else: +        for j in range(d - 1, -1, -1): +            if (i >> j) & 1: +                continue +            for k in range(P[j]): +                if total >= g: +                    break +                total += 100 * (j + 1) +                num += 1 +        tmp = min(tmp, num) +print(tmp)