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())
  
  p = []  # 各点数台の問題数のリスト
  c = []  # 各点数台のコンプリートボーナス
  
  # 各点数台を、完全に解くかどうかのリスト　1問も解かないとして初期化
  solve_completely_list = [False] * D
  
  # 入力処理
  for d in range(D):
      p_i, c_i = map(int, input().split())
      p.append(p_i)
      c.append(c_i)
  
  
  def dfs(i, solve_completely_list, completed_amount_list):
      if i >= D:
          is_larger_than_G = False  # フラグ初期化
          # total_score計算
          total_score = 0
          completed_amount = 0
          for d in range(D):
              if solve_completely_list[d]:
                  total_score += (d + 1) * 100 * p[d] + c[d]
                  completed_amount += p[d]
  
          # total_scoreがGより小さいとき
          # Gより大きくなるまで、一番大きい配点を足す
          # 一番大きい配点をp-1個足してもGより小さい場合、諦めて他の枝に移る
          if total_score < G:
              # solve_completely_list[D]がTrueのときは、(D-1) * 100を最大の配点とする
              # solve_completely_list[i]がFalseであるiのうち最大のiの配点を使う
              max_d = -1
              for i in reversed(range(D)):
                  if solve_completely_list[i] == False:
                      max_d = i
                      break
              # 多分ありえないけど一応
              if max_d == -1:
                  return
  
              for p_d in range(p[max_d - 1] - 1):
                  total_score += max_d * 100
                  completed_amount += 1
                  if total_score >= G:
                      is_larger_than_G = True
                      break
          else:
              is_larger_than_G = True
  
          if is_larger_than_G:
              completed_amount_list.append(completed_amount)
          return
  
      # 完全に解く(100i 点の問題を pi 問解く)場合
      solve_completely_list[i] = True
      dfs(i + 1, solve_completely_list, completed_amount_list)
  
      # 1問も解かない場合
      solve_completely_list[i] = False
      dfs(i + 1, solve_completely_list, completed_amount_list)
  
  
  completed_amount_list = []  # 回答した数のリスト
  dfs(0, solve_completely_list, completed_amount_list)
  print(min(completed_amount_list))
  
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."}]