title: Count Strings With Consecutive 1S
signature: countStringsWithConsecutive1S :: Integer -> Integer
  countStringsWithConsecutive1S n = 
test_code: import Text.Printf
  import Control.Exception (catch, SomeException)
  import Data.Typeable
  import qualified Data.List as List
  import qualified Data.Map as Map
  import qualified Data.Set as Set
  
  -- SOLUTION CODE
  -- ============================================
  
  PLACEHOLDER_CODE_BODY
  
  -- TESTING CODE 
  -- ============================================
  validateSolution :: Integer -> Integer -> Bool
  validateSolution actual expected = do
      actual == expected
  
  
  driver :: Integer -> Integer -> String
  driver n expected = do
      if (validateSolution (PLACEHOLDER_FN_NAME n) expected)
          then "PASSED"
      else "FAILED"
  
  main = do
      printf "TEST-0...%s\n" (driver (27) (133703499) )
  
      printf "TEST-1...%s\n" (driver (13) (7582) )
  
      printf "TEST-2...%s\n" (driver (33) (8580707127) )
  
      printf "TEST-3...%s\n" (driver (57) (144114231353829831) )
  
      printf "TEST-4...%s\n" (driver (51) (2251746497394075) )
  
      printf "TEST-5...%s\n" (driver (10) (880) )
  
      printf "TEST-6...%s\n" (driver (1) (0) )
  
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 ];
  }