title: Count Fibonacci Numbers Given Range Log Time
signature: function count_fibonacci_numbers_given_range_log_time(low, high)
test_code: using Printf
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  function validate_solution(actual, expected)
      return actual == expected
  end
  
  function driver(low, high, expected)
      try
  
          if validate_solution(PLACEHOLDER_FN_NAME(low, high), expected)
              return "PASSED";
          end
          return "FAILED";
      catch exception_obj
          return string(Base.typename(typeof(exception_obj)).wrapper);
      end
  end
  
  function main()
      
      result = driver(76, 43, 0);
      @printf("TEST-0...%s\n",result);
      
      result = driver(96, 52, 0);
      @printf("TEST-1...%s\n",result);
      
      result = driver(19, 79, 3);
      @printf("TEST-2...%s\n",result);
      
      result = driver(36, 2, 0);
      @printf("TEST-3...%s\n",result);
      
      result = driver(60, 11, 0);
      @printf("TEST-4...%s\n",result);
      
      result = driver(20, 15, 0);
      @printf("TEST-5...%s\n",result);
      
      result = driver(76, 4, 0);
      @printf("TEST-6...%s\n",result);
      
      result = driver(63, 93, 1);
      @printf("TEST-7...%s\n",result);
      
      result = driver(2, 25, 6);
      @printf("TEST-8...%s\n",result);
      
      result = driver(41, 39, 0);
      @printf("TEST-9...%s\n",result);
      
  end
  
  main()
source_py: def count_fibonacci_numbers_given_range_log_time(low, high):
      (f1, f2, f3) = (0, 1, 1)
      result = 0
      while (f1 <= high):
          if (f1 >= low):
              result += 1
          f1 = f2
          f2 = f3
          f3 = (f1 + f2)
      return result
source_cpp: int count_fibonacci_numbers_given_range_log_time(int low, int high) {
    int f1 = 0, f2 = 1, f3 = 1;
    int result = 0;
    while ( f1 <= high ) {
      if ( f1 >= low ) result ++;
      f1 = f2;
      f2 = f3;
      f3 = f1 + f2;
    }
    return result;
  }