import sys

input=sys.stdin.readline

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)
d,g=list(map(int,input().split()))

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

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

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

ans=10**9

def dfs(cur,target):

  if cur==0:

    return 10**9

  cnt=min(target//(cur*100),P[cur-1]) #P[j]の一部を利用する/全部利用のどちらか小さい方選択

  tmp=(100*cur)*cnt

  if cnt==P[cur-1]:

    tmp+=C[cur-1]

  if tmp<target:

    cnt+=dfs(cur-1,target-tmp)       #減らした値でdfs実行

  return min(cnt,dfs(cur-1,target))

print((dfs(d,g)))
import sys

input = sys.stdin.readline
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)

d, g = list(map(int, input().split()))
PC = [list(map(int, input().split())) for i in range(d)]
P = list([x[0] for x in PC])
C = list([x[1] for x in PC])
ans = 10**9


def dfs(cur, target):
    if cur == 0:
        return 10**9
    cnt = min(target // (cur * 100), P[cur - 1])  # P[j]の一部を利用する/全部利用のどちらか小さい方選択
    tmp = (100 * cur) * cnt
    if cnt == P[cur - 1]:
        tmp += C[cur - 1]
    if tmp < target:
        cnt += dfs(cur - 1, target - tmp)  # 減らした値でdfs実行
    return min(cnt, dfs(cur - 1, target))


print((dfs(d, g)))

-import sys +d, g = list(map(int, input().split())) +PC = [list(map(int, input().split())) for i in range(d)] +P = list([x[0] for x in PC]) +C = list([x[1] for x in PC]) +ans = 10**9 -input = sys.stdin.readline -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) + +def dfs(cur, target): +    if cur == 0: +        return 10**9 +    cnt = min(target // (cur * 100), P[cur - 1])  # P[j]の一部を利用する/全部利用のどちらか小さい方選択 +    tmp = (100 * cur) * cnt +    if cnt == P[cur - 1]: +        tmp += C[cur - 1] +    if tmp < target: +        cnt += dfs(cur - 1, target - tmp)  # 減らした値でdfs実行 +    return min(cnt, dfs(cur - 1, target)) + + +print((dfs(d, g)))