title: Find Index Given Fibonacci Number Constant Time 1
signature: function findIndexGivenFibonacciNumberConstantTime1($n) {
test_code: <?php
  
  
  // SOLUTION CODE 
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function validateSolution($actual, $expected){
      return serialize($actual) == serialize($expected);
  }
  
  function driver($n, $expected){
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME($n), $expected)){
          return "PASSED";
        }
        return "FAILED";
      }
      catch (Exception $exception_obj) {
        return get_class($exception_obj);
      }
  }
  
  function main(){
      printf("TEST-0...%s\n",driver(
        20, 
        8));
      
      printf("TEST-1...%s\n",driver(
        95, 
        11));
      
      printf("TEST-2...%s\n",driver(
        39, 
        9));
      
      printf("TEST-3...%s\n",driver(
        21, 
        8));
      
      printf("TEST-4...%s\n",driver(
        94, 
        11));
      
      printf("TEST-5...%s\n",driver(
        79, 
        11));
      
      printf("TEST-6...%s\n",driver(
        56, 
        10));
      
      printf("TEST-7...%s\n",driver(
        62, 
        10));
      
      printf("TEST-8...%s\n",driver(
        23, 
        8));
      
      printf("TEST-9...%s\n",driver(
        3, 
        4));
      
  }
  
  main();
  ?>
source_py: def find_index_given_fibonacci_number_constant_time_1(n):
      fibo = ((2.078087 * math.log(n)) + 1.672276)
      return round(fibo)
source_cpp: int find_index_given_fibonacci_number_constant_time_1(int n) {
    float fibo = 2.078087 * log ( n ) + 1.672276;
    return round ( fibo );
  }