private static void test3 ( final Scanner sc , final PrintWriter pw ) {
  final int D = sc . nextInt ( ) ;
  List < Integer > nums = new ArrayList < Integer > ( ) ;
  for ( int i = 0 ;
  i < D ;
  i ++ ) {
    nums . add ( sc . nextInt ( ) ) ;
  }
  int max = Collections . max ( nums ) ;
  int bt = max ;
  for ( int m = 1 ;
  m <= max ;
  m ++ ) {
    System . out . println ( "for m = " + m ) ;
    int t = m ;
    for ( int k : nums ) {
      if ( k != 0 ) t += ( k % m == 0 ) ? ( k / m ) - 1 : k / m ;
    }
    System . out . println ( "t = " + t ) ;
    if ( t < bt ) {
      bt = t ;
    }
  }
  pw . print ( bt ) ;
}

private static void test3 ( final Scanner sc , final PrintWriter pw ) { final int D = sc . nextInt ( ) ; List < Integer > nums = new ArrayList < Integer > ( ) ; for ( int i = 0 ; i < D ; i ++ ) { nums . add ( sc . nextInt ( ) ) ; } int max = Collections . max ( nums ) ; int bt = max ; for ( int m = 1 ; m <= max ; m ++ ) { System . out . println ( " for ▁ m ▁ = ▁ " + m ) ; int t = m ; for ( int k : nums ) { if ( k != 0 ) t += ( k % m == 0 ) ? ( k / m ) - 1 : k / m ; } System . out . println ( " t ▁ = ▁ " + t ) ; if ( t < bt ) { bt = t ; } } pw . print ( bt ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter (modifiers) type: (type_identifier) name: (identifier)) (formal_parameter (modifiers) type: (type_identifier) name: (identifier))) body: (block (local_variable_declaration (modifiers) type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (generic_type (type_identifier) (type_arguments (type_identifier))) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (generic_type (type_identifier) (type_arguments (type_identifier))) arguments: (argument_list)))) (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 (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (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 (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (string_literal) right: (identifier))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (identifier))) (enhanced_for_statement type: (integral_type) name: (identifier) value: (identifier) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (expression_statement (assignment_expression left: (identifier) right: (ternary_expression condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))) consequence: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (decimal_integer_literal)) alternative: (binary_expression left: (identifier) right: (identifier)))))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (string_literal) right: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (identifier))))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))))