static int findNum ( int n ) {
  int low = 0 , hi = 2 * n ;
  if ( n <= 0 ) return - 1 ;
  if ( findDigitsInFactorial ( low ) == n ) return low ;
  while ( low <= hi ) {
    int mid = ( low + hi ) / 2 ;
    if ( findDigitsInFactorial ( mid ) >= n && findDigitsInFactorial ( mid - 1 ) < n ) return mid ;
    else if ( findDigitsInFactorial ( mid ) < n ) low = mid + 1 ;
    else hi = mid - 1 ;
  }
  return low ;
}

static int findNum ( int n ) { int low = 0 , hi = 2 * n ; if ( n <= 0 ) return - 1 ; if ( findDigitsInFactorial ( low ) == n ) return low ; while ( low <= hi ) { int mid = ( low + hi ) / 2 ; if ( findDigitsInFactorial ( mid ) >= n && findDigitsInFactorial ( mid - 1 ) < n ) return mid ; else if ( findDigitsInFactorial ( mid ) < n ) low = mid + 1 ; else hi = mid - 1 ; } return low ; }
(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)) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (decimal_integer_literal) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (return_statement (unary_expression operand: (decimal_integer_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (method_invocation name: (identifier) arguments: (argument_list (identifier))) right: (identifier))) consequence: (return_statement (identifier))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (decimal_integer_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (method_invocation name: (identifier) arguments: (argument_list (identifier))) right: (identifier)) right: (binary_expression left: (method_invocation name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (decimal_integer_literal)))) right: (identifier)))) consequence: (return_statement (identifier)) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (method_invocation name: (identifier) arguments: (argument_list (identifier))) right: (identifier))) consequence: (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) alternative: (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))))))) (return_statement (identifier))))