title: Count Strings With Consecutive 1S
signature: pub fn count_strings_with_consecutive_1s(n: i32) -> i64 {
test_code: use std::collections::HashMap;
  use std::collections::HashSet;
  use std::cmp::*;
  use std::collections::*;
  use std::fmt::*; 
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  pub fn validate_solution(actual: i64, expected: i64)->bool{
  return actual==expected
  }
  pub fn driver(n: i32, expected: i64)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(n), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        27, 
        133703499
      ));
      
      println!("TEST-1...{}", driver(
        13, 
        7582
      ));
      
      println!("TEST-2...{}", driver(
        33, 
        8580707127
      ));
      
      println!("TEST-3...{}", driver(
        57, 
        144114231353829831
      ));
      
      println!("TEST-4...{}", driver(
        51, 
        2251746497394075
      ));
      
      println!("TEST-5...{}", driver(
        10, 
        880
      ));
      
      println!("TEST-6...{}", 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 ];
  }