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

dic = [0]*(D+1)

for i in range(D):

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

  dic[i+1] = (p,c)

ans = 10**9

for i in range(2**D):

  ls = []

  x = i

  v = 0

  count = 0

  for j in range(D):

    if x%2==1:

      ls += [j+1]

    x = x>>1

  for h in ls:

    p, c = dic[h]

    v += p*h*100 + c

    count += p

  if G>v:

    for j in range(D, 0, -1):

      if not j in ls:

        break

    else:

      continue

    m = dic[j][0]

    while m>1:

      v += j*100

      count += 1

      m -= 1

      if v>=G:

        break

    else:

      continue

  if count<ans:

    ans = count

print(ans)
D, G, *L = list(map(int, open(0).read().split()))

inf = []

for m in zip(*[iter(L)]*2):

  inf.append(m)



ans = float('inf')

for i in range(2**D):

  m = 0

  cnt = 0

  log = []

  for j in range(D):

    if i%2==0:

      m += 100*(j+1)*inf[j][0]+inf[j][1]

      cnt += inf[j][0]

    else:

      log.append(j)

    i>>=1

  while m<G:

    if log==[]:

      break

    h = log.pop()

    s = 100*(h+1)

    x = (G-m)//s if (G-m)%s==0 else (G-m)//s+1

    c = min(inf[h][0]-1, x)

    m += c*s

    cnt += c

  else:

    ans = min(ans,cnt)

print(ans)
D, G = list(map(int, input().split()))
dic = [0] * (D + 1)
for i in range(D):
    p, c = list(map(int, input().split()))
    dic[i + 1] = (p, c)
ans = 10**9
for i in range(2**D):
    ls = []
    x = i
    v = 0
    count = 0
    for j in range(D):
        if x % 2 == 1:
            ls += [j + 1]
        x = x >> 1
    for h in ls:
        p, c = dic[h]
        v += p * h * 100 + c
        count += p
    if G > v:
        for j in range(D, 0, -1):
            if not j in ls:
                break
        else:
            continue
        m = dic[j][0]
        while m > 1:
            v += j * 100
            count += 1
            m -= 1
            if v >= G:
                break
        else:
            continue
    if count < ans:
        ans = count
print(ans)

D, G, *L = list(map(int, open(0).read().split()))
inf = []
for m in zip(*[iter(L)] * 2):
    inf.append(m)
ans = float("inf")
for i in range(2**D):
    m = 0
    cnt = 0
    log = []
    for j in range(D):
        if i % 2 == 0:
            m += 100 * (j + 1) * inf[j][0] + inf[j][1]
            cnt += inf[j][0]
        else:
            log.append(j)
        i >>= 1
    while m < G:
        if log == []:
            break
        h = log.pop()
        s = 100 * (h + 1)
        x = (G - m) // s if (G - m) % s == 0 else (G - m) // s + 1
        c = min(inf[h][0] - 1, x)
        m += c * s
        cnt += c
    else:
        ans = min(ans, cnt)
print(ans)

-D, G = list(map(int, input().split())) -dic = [0] * (D + 1) -for i in range(D): -    p, c = list(map(int, input().split())) -    dic[i + 1] = (p, c) -ans = 10**9 +D, G, *L = list(map(int, open(0).read().split())) +inf = [] +for m in zip(*[iter(L)] * 2): +    inf.append(m) +ans = float("inf") -    ls = [] -    x = i -    v = 0 -    count = 0 +    m = 0 +    cnt = 0 +    log = [] -        if x % 2 == 1: -            ls += [j + 1] -        x = x >> 1 -    for h in ls: -        p, c = dic[h] -        v += p * h * 100 + c -        count += p -    if G > v: -        for j in range(D, 0, -1): -            if not j in ls: -                break +        if i % 2 == 0: +            m += 100 * (j + 1) * inf[j][0] + inf[j][1] +            cnt += inf[j][0] -            continue -        m = dic[j][0] -        while m > 1: -            v += j * 100 -            count += 1 -            m -= 1 -            if v >= G: -                break -        else: -            continue -    if count < ans: -        ans = count +            log.append(j) +        i >>= 1 +    while m < G: +        if log == []: +            break +        h = log.pop() +        s = 100 * (h + 1) +        x = (G - m) // s if (G - m) % s == 0 else (G - m) // s + 1 +        c = min(inf[h][0] - 1, x) +        m += c * s +        cnt += c +    else: +        ans = min(ans, cnt)