title: Count Strings With Consecutive 1S
signature: function count_strings_with_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(27, 133703499);
      @printf("TEST-0...%s\n",result);
      
      result = driver(13, 7582);
      @printf("TEST-1...%s\n",result);
      
      result = driver(33, 8580707127);
      @printf("TEST-2...%s\n",result);
      
      result = driver(57, 144114231353829831);
      @printf("TEST-3...%s\n",result);
      
      result = driver(51, 2251746497394075);
      @printf("TEST-4...%s\n",result);
      
      result = driver(10, 880);
      @printf("TEST-5...%s\n",result);
      
      result = driver(1, 0);
      @printf("TEST-6...%s\n",result);
      
  end
  
  main()
source_py: def count_strings_with_consecutive_1s(n):
      a = ([0] * n)
      b = ([0] * 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 (((1 << n) - a[(n - 1)]) - b[(n - 1)])
source_cpp: int count_strings_with_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 ( 1 << n ) - a [ n - 1 ] - b [ n - 1 ];
  }