title: Count Number Binary Strings Without Consecutive 1S
signature: function count_number_binary_strings_without_consecutive_1s(n)
test_code: using Printf
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  function validate_solution(actual, expected)
      return actual == expected
  end
  
  function driver(n, expected)
      try
  
          if validate_solution(PLACEHOLDER_FN_NAME(n), expected)
              return "PASSED";
          end
          return "FAILED";
      catch exception_obj
          return string(Base.typename(typeof(exception_obj)).wrapper);
      end
  end
  
  function main()
      
      result = driver(75, 5527939700884757);
      @printf("TEST-0...%s\n",result);
      
      result = driver(14, 987);
      @printf("TEST-1...%s\n",result);
      
      result = driver(5, 13);
      @printf("TEST-2...%s\n",result);
      
      result = driver(41, 433494437);
      @printf("TEST-3...%s\n",result);
      
      result = driver(35, 24157817);
      @printf("TEST-4...%s\n",result);
      
      result = driver(30, 2178309);
      @printf("TEST-5...%s\n",result);
      
      result = driver(84, 420196140727489673);
      @printf("TEST-6...%s\n",result);
      
      result = driver(53, 139583862445);
      @printf("TEST-7...%s\n",result);
      
  end
  
  main()
source_py: def count_number_binary_strings_without_consecutive_1s(n):
      a = [0 for i in range(n)]
      b = [0 for i in range(n)]
      a[0] = b[0] = 1
      for i in range(1, n):
          a[i] = (a[(i - 1)] + b[(i - 1)])
          b[i] = a[(i - 1)]
      return (a[(n - 1)] + b[(n - 1)])
source_cpp: int count_number_binary_strings_without_consecutive_1s(int n) {
    int a [ n ], b [ n ];
    a [ 0 ] = b [ 0 ] = 1;
    for ( int i = 1;
    i < n;
    i ++ ) {
      a [ i ] = a [ i - 1 ] + b [ i - 1 ];
      b [ i ] = a [ i - 1 ];
    }
    return a [ n - 1 ] + b [ n - 1 ];
  }