title: Count Strings With Consecutive 1S
signature: countStringsWithConsecutive1S(n) {
test_code: import 'dart:convert';
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(int actual, int expected){
      return actual.toString() == expected.toString();
  }
  
  String driver(n, int expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(n), expected)){
              return "PASSED";
          }
          return "FAILED";
      }catch(exception_object){
          return exception_object.runtimeType.toString();
      }
  }
  
  int main() {
  
      print("TEST-0...${driver(
          27, 
          133703499)
      }");
  
      print("TEST-1...${driver(
          13, 
          7582)
      }");
  
      print("TEST-2...${driver(
          33, 
          8580707127)
      }");
  
      print("TEST-3...${driver(
          57, 
          144114231353829831)
      }");
  
      print("TEST-4...${driver(
          51, 
          2251746497394075)
      }");
  
      print("TEST-5...${driver(
          10, 
          880)
      }");
  
      print("TEST-6...${driver(
          1, 
          0)
      }");
  
      return 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 ];
  }