static int getMaximumSumWithLCMN ( int N ) {
  int sum = 0 ;
  int LIM = ( int ) Math . sqrt ( N ) ;
  for ( int i = 1 ;
  i <= LIM ;
  i ++ ) {
    if ( N % i == 0 ) {
      if ( i == ( N / i ) ) sum += i ;
      else sum += ( i + N / i ) ;
    }
  }
  return sum ;
}

static int getMaximumSumWithLCMN ( int N ) { int sum = 0 ; int LIM = ( int ) Math . sqrt ( N ) ; for ( int i = 1 ; i <= LIM ; i ++ ) { if ( N % i == 0 ) { if ( i == ( N / i ) ) sum += i ; else sum += ( i + N / i ) ; } } return sum ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (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 (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 (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))) consequence: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))) consequence: (expression_statement (assignment_expression left: (identifier) right: (identifier))) alternative: (expression_statement (assignment_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier))))))))))) (return_statement (identifier))))