title: Count Number Binary Strings Without Consecutive 1S
signature: fun countNumberBinaryStringsWithoutConsecutive1S(n: Int): Long {
source_py: def count_number_binary_strings_without_consecutive_1s(n):
      a = [0 for i in range(n)]
      b = [0 for i in range(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 (a[(n - 1)] + b[(n - 1)])
source_cpp: int count_number_binary_strings_without_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 a [ n - 1 ] + b [ n - 1 ];
  }
question_info.test_list: [{"idx": 0, "outputs": 5527939700884757, "inputs": {"n": 75}}, {"idx": 1, "outputs": 987, "inputs": {"n": 14}}, {"idx": 2, "outputs": 13, "inputs": {"n": 5}}, {"idx": 3, "outputs": 433494437, "inputs": {"n": 41}}, {"idx": 4, "outputs": 24157817, "inputs": {"n": 35}}, {"idx": 5, "outputs": 2178309, "inputs": {"n": 30}}, {"idx": 6, "outputs": 420196140727489673, "inputs": {"n": 84}}, {"idx": 7, "outputs": 139583862445, "inputs": {"n": 53}}]
question_info.extension: kts
question_info.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(75, 5527939700884757)
      println("TEST-0...${result}")
      
      result = driver(14, 987)
      println("TEST-1...${result}")
      
      result = driver(5, 13)
      println("TEST-2...${result}")
      
      result = driver(41, 433494437)
      println("TEST-3...${result}")
      
      result = driver(35, 24157817)
      println("TEST-4...${result}")
      
      result = driver(30, 2178309)
      println("TEST-5...${result}")
      
      result = driver(84, 420196140727489673)
      println("TEST-6...${result}")
      
      result = driver(53, 139583862445)
      println("TEST-7...${result}")
      
          
  }
  
  main()
question_info.entry_fn_name: countNumberBinaryStringsWithoutConsecutive1S
question_info.entry_cls_name: Solution
question_info.test_case_ids: 0 1 2 3 4 5 6 7
question_info.commands: kotlinc -script __FILENAME__ -no-reflect -nowarn