title: Count Strings With Consecutive 1S
signature: fun countStringsWithConsecutive1S(n: Int): Long {
test_code: package main
  
  import kotlin.text.*
  import kotlin.math.*
  
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  fun validateSolution(actual:Long, expected:Long):Boolean{
    return actual.equals(expected)
  }
  fun driver(n: Int, expected:Long):String {
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME(n), expected)) {
                return "PASSED"
        }
        return "FAILED"
      } catch (e: Exception){
        return e::class.simpleName as String
      }
  
  }
  
  fun main() {
      var result: String = ""
      result = driver(27, 133703499)
      println("TEST-0...${result}")
      
      result = driver(13, 7582)
      println("TEST-1...${result}")
      
      result = driver(33, 8580707127)
      println("TEST-2...${result}")
      
      result = driver(57, 144114231353829831)
      println("TEST-3...${result}")
      
      result = driver(51, 2251746497394075)
      println("TEST-4...${result}")
      
      result = driver(10, 880)
      println("TEST-5...${result}")
      
      result = driver(1, 0)
      println("TEST-6...${result}")
      
          
  }
  
  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 ];
  }