output_description: Print the minimum number of problems that needs to be solved in order to have
  a total score of G or more points. Note that this objective is always
  achievable (see Constraints).
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      D G
      p_1 c_1
      :
      p_D c_D
attempt: d, g = map(int, input().split())
  
  k = [list(map(int, input().split())) for i in range(d)]
  
  x = 0
  y = 0
  z = 0
  xcount = 0
  
  # 大きいものから順番に
  for v in range(d, 0, -1):
      for i in range(1, k[v - 1][0] + 1):
          x += 100 * v
          if i == k[v - 1][0]:
              x += k[v - 1][1]
          xcount += 1
          if x >= g:
              break
      else:
          continue
      break
  
  # print(xcount)
  
  # ボーナスこみでpiだけで賄えるものも個数が最小のもの
  m = []
  n = []
  for j in range(d):
      m.append(100 * (j + 1) * k[j][0] + k[j][1])
      n.append(k[j][0])
  
  p = []
  q = []
  r = []
  for j in range(len(m)):
      if m[j] >= g:
          p.append(n[j])
      else:
          q.append(m[j])
          r.append(n[j])
  
  if p != []:
      ycount = min(p)
  else:
      ycount = 1001
  # print(ycount)
  
  # ボーナスこみでpiだけで賄えないものと大きいのを足した個数が最小のもの
  zcount = 0
  add = 0
  zar = []
  addar = []
  h = d - 1
  proh = 0
  
  R = sum(r)
  hiku = 0
  arc = [0 for i in range(d)]
  for j in range(len(q)):
      add = q[j]
      comp = q[j]
      for w in range(1, R + 1):
          for u in range(len(q)):
              # qaz = w - hiku
              if h == j:
                  h -= 1
              if (
                  w == r[u] and j != u
              ):  # 満タンにぴったり一致するときボーナス分と今までと最大のやつを比較
                  if add + 100 * (h + 1) - comp < q[u]:  # 100 * w * (h + 1)
                      addar.append(q[u])
                      if h == u:
                          proh = 1
                      # 100 * d * (w - 1 - pom[pomcount])
                      # pom.append(w - 1)
                      # pomcount += 1
              if u == len(q) - 1 and addar != []:
                  add = add + max(addar) - (add - comp)  # + q[j]
                  # comp = add
                  arc[q.index(max(addar))] += 1
                  arc = [0 for i in range(d)]
                  arc[q.index(max(addar))] = w
                  for m in range(len(q)):
                      if arc[m] < k[m][0] and m != j:
                          h = m
              if u == len(q) - 1 and addar == []:
                  add += 100 * (h + 1)
                  arc[h] += 1
          zcount += 1
          if arc[h] == k[h][0]:
              hiku += arc[h]
              if proh == 0:
                  add += k[h][1]
              h -= 1
              if h == j:
                  h -= 1
          proh = 0
          addar = []
          if add >= g:
              zar.append(zcount + r[j])
              zcount = 0
  
              h = d - 1
              arc = [0 for i in range(d)]
              comp = 0
              hiku = 0
              break
  
  if zar != []:
      coz = min(zar)
  else:
      coz = 1001
  # print(coz)
  
  
  print(min(xcount, ycount, coz))
  
problem_description: Statement
  
  A programming competition site _AtCode_ provides algorithmic problems. Each
  problem is allocated a score based on its difficulty. Currently, for each
  integer i between 1 and D (inclusive), there are p_i problems with a score of
  100i points. These p_1 + … + p_D problems are all of the problems available on
  AtCode.
  
  A user of AtCode has a value called _total score_. The total score of a user
  is the sum of the following two elements:
  
    * Base score: the sum of the scores of all problems solved by the user.
    * Perfect bonuses: when a user solves all problems with a score of 100i points, he/she earns the perfect bonus of c_i points, aside from the base score (1 ≤ i ≤ D).
  
  Takahashi, who is the new user of AtCode, has not solved any problem. His
  objective is to have a total score of G or more points. At least how many
  problems does he need to solve for this objective?
samples: [{"input": "2 700\n    3 500\n    5 800", "output": "3\n    \n\nIn this case, there are three problems each with 100 points and five problems\neach with 200 points. The perfect bonus for solving all the 100-point problems\nis 500 points, and the perfect bonus for solving all the 200-point problems is\n800 points. Takahashi's objective is to have a total score of 700 points or\nmore.\n\nOne way to achieve this objective is to solve four 200-point problems and earn\na base score of 800 points. However, if we solve three 100-point problems, we\ncan earn the perfect bonus of 500 points in addition to the base score of 300\npoints, for a total score of 800 points, and we can achieve the objective with\nfewer problems.\n\n* * *"}, {"input": "2 2000\n    3 500\n    5 800", "output": "7\n    \n\nThis case is similar to Sample Input 1, but the Takahashi's objective this\ntime is 2000 points or more. In this case, we inevitably need to solve all\nfive 200-point problems, and by solving two 100-point problems additionally we\nhave the total score of 2000 points.\n\n* * *"}, {"input": "2 400\n    3 500\n    5 800", "output": "2\n    \n\nThis case is again similar to Sample Input 1, but the Takahashi's objective\nthis time is 400 points or more. In this case, we only need to solve two\n200-point problems to achieve the objective.\n\n* * *"}, {"input": "5 25000\n    20 1000\n    40 1000\n    50 1000\n    30 1000\n    1 1000", "output": "66\n    \n\nThere is only one 500-point problem, but the perfect bonus can be earned even\nin such a case."}]