public static void main ( String [ ] args ) {
  int d = scanner . nextInt ( ) , g = scanner . nextInt ( ) ;
  int [ ] p = new int [ d ] , c = new int [ d ] ;
  for ( int i = 0 ;
  i < d ;
  i ++ ) {
    p [ i ] = scanner . nextInt ( ) ;
    c [ i ] = scanner . nextInt ( ) ;
  }
  int ans = 10000 ;
  for ( int i = 0 ;
  i < 1 << d ;
  i ++ ) {
    int sum = 0 , count = 0 , zero = 0 ;
    for ( int j = 0 ;
    j < d ;
    j ++ ) {
      if ( ( 1 << j & i ) != 0 ) {
        sum += ( j + 1 ) * 100 * p [ j ] + c [ j ] ;
        count += p [ j ] ;
      }
      else {
        zero = j ;
      }
    }
    if ( sum < g ) {
      int t = ( int ) Math . ceil ( ( g - sum ) / ( ( zero + 1 ) * 100F ) ) ;
      if ( p [ zero ] < t ) continue ;
      count += Math . ceil ( ( g - sum ) / ( ( zero + 1 ) * 100F ) ) ;
    }
    ans = Math . min ( ans , count ) ;
  }
  System . out . println ( ans ) ;
}

public static void main ( String [ ] args ) { int d = scanner . nextInt ( ) , g = scanner . nextInt ( ) ; int [ ] p = new int [ d ] , c = new int [ d ] ; for ( int i = 0 ; i < d ; i ++ ) { p [ i ] = scanner . nextInt ( ) ; c [ i ] = scanner . nextInt ( ) ; } int ans = 10000 ; for ( int i = 0 ; i < 1 << d ; i ++ ) { int sum = 0 , count = 0 , zero = 0 ; for ( int j = 0 ; j < d ; j ++ ) { if ( ( 1 << j & i ) != 0 ) { sum += ( j + 1 ) * 100 * p [ j ] + c [ j ] ; count += p [ j ] ; } else { zero = j ; } } if ( sum < g ) { int t = ( int ) Math . ceil ( ( g - sum ) / ( ( zero + 1 ) * 100F ) ) ; if ( p [ zero ] < t ) continue ; count += Math . ceil ( ( g - sum ) / ( ( zero + 1 ) * 100F ) ) ; } ans = Math . min ( ans , count ) ; } System . out . println ( ans ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (array_type element: (integral_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (identifier)))) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (identifier))))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (binary_expression left: (decimal_integer_literal) right: (identifier))) update: (update_expression (identifier)) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal)) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal)) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (decimal_integer_literal) right: (identifier)) right: (identifier))) right: (decimal_integer_literal))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (decimal_integer_literal)) right: (array_access array: (identifier) index: (identifier))) right: (array_access array: (identifier) index: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (array_access array: (identifier) index: (identifier))))) alternative: (block (expression_statement (assignment_expression left: (identifier) right: (identifier))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (cast_expression type: (integral_type) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (decimal_floating_point_literal))))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (identifier))) consequence: (continue_statement)) (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (decimal_floating_point_literal)))))))))) (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (identifier))))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier))))))