title: Find Index Given Fibonacci Number Constant Time 1
signature: find_index_given_fibonacci_number_constant_time_1 <- function(n) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      toString(actual)==toString(expected)
  }
  
  driver <- function(n, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(n), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          20L, 
          8L
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          95L, 
          11L
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          39L, 
          9L
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          21L, 
          8L
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          94L, 
          11L
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          79L, 
          11L
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          56L, 
          10L
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          62L, 
          10L
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          23L, 
          8L
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          3L, 
          4L
      )))
  
  }
  
  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 );
  }