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

G = G/100

P = []; C = []

for i in range(D):

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

  P.append(p)

  C.append(c/100)

m = 10**3

for k in range(2**D):

  R = list(range(D))[::-1]

  point = G

  prob = 0

  for d in range(D):

    if k%(2**(d+1)) >= 2**d:

      p = P[d]; c = C[d]

      point -= (d+1)*p + c

      prob += p

      R.remove(d)

  for r in R:

    if point > 0:

      p = P[r]

      if point/(r+1) <= p:

        prob += -(-point//(r+1))

        point = 0

      else:

        point -= (r+1)*p + C[r]

        prob += p

  if m >= prob:

    m = prob

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

G = G/100

P = []; C = []

for i in range(D):

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

  P.append(p)

  C.append(c/100)

m = 10**3

for k in range(2**D):

  R = list(range(D))[::-1]

  point = G

  prob = 0

  for d in range(D):

    if k & 1<<d:

      p = P[d]; c = C[d]

      point -= (d+1)*p + c

      prob += p

      R.remove(d)

  for r in R:

    if point > 0:

      p = P[r]

      if point/(r+1) <= p:

        prob += -(-point//(r+1))

        point = 0

      else:

        point -= (r+1)*p + C[r]

        prob += p

  if m >= prob:

    m = prob

print((int(m)))
D, G = list(map(int, input().split()))
G = G / 100
P = []
C = []
for i in range(D):
    p, c = list(map(int, input().split()))
    P.append(p)
    C.append(c / 100)
m = 10**3
for k in range(2**D):
    R = list(range(D))[::-1]
    point = G
    prob = 0
    for d in range(D):
        if k % (2 ** (d + 1)) >= 2**d:
            p = P[d]
            c = C[d]
            point -= (d + 1) * p + c
            prob += p
            R.remove(d)
    for r in R:
        if point > 0:
            p = P[r]
            if point / (r + 1) <= p:
                prob += -(-point // (r + 1))
                point = 0
            else:
                point -= (r + 1) * p + C[r]
                prob += p
    if m >= prob:
        m = prob
print((int(m)))

D, G = list(map(int, input().split()))
G = G / 100
P = []
C = []
for i in range(D):
    p, c = list(map(int, input().split()))
    P.append(p)
    C.append(c / 100)
m = 10**3
for k in range(2**D):
    R = list(range(D))[::-1]
    point = G
    prob = 0
    for d in range(D):
        if k & 1 << d:
            p = P[d]
            c = C[d]
            point -= (d + 1) * p + c
            prob += p
            R.remove(d)
    for r in R:
        if point > 0:
            p = P[r]
            if point / (r + 1) <= p:
                prob += -(-point // (r + 1))
                point = 0
            else:
                point -= (r + 1) * p + C[r]
                prob += p
    if m >= prob:
        m = prob
print((int(m)))

-        if k % (2 ** (d + 1)) >= 2**d: +        if k & 1 << d: