title: Count Possible Ways To Construct Buildings
signature: fun countPossibleWaysToConstructBuildings(n: Int): Long {
source_py: def count_possible_ways_to_construct_buildings(N):
      if (N == 1):
          return 4
      countB = 1
      countS = 1
      for i in range(2, (N + 1)):
          prev_countB = countB
          prev_countS = countS
          countS = (prev_countB + prev_countS)
          countB = prev_countS
      result = (countS + countB)
      return (result * result)
source_cpp: int count_possible_ways_to_construct_buildings(int N) {
    if ( N == 1 ) return 4;
    int countB = 1, countS = 1, prev_countB, prev_countS;
    for ( int i = 2;
    i <= N;
    i ++ ) {
      prev_countB = countB;
      prev_countS = countS;
      countS = prev_countB + prev_countS;
      countB = prev_countS;
    }
    int result = countS + countB;
    return ( result * result );
  }
question_info.test_list: [{"idx": 0, "outputs": 17480761, "inputs": {"n": 17}}, {"idx": 1, "outputs": 222915410843904, "inputs": {"n": 34}}, {"idx": 2, "outputs": 7921, "inputs": {"n": 9}}]
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(17, 17480761)
      println("TEST-0...${result}")
      
      result = driver(34, 222915410843904)
      println("TEST-1...${result}")
      
      result = driver(9, 7921)
      println("TEST-2...${result}")
      
          
  }
  
  main()
question_info.entry_fn_name: countPossibleWaysToConstructBuildings
question_info.entry_cls_name: Solution
question_info.test_case_ids: 0 1 2
question_info.commands: kotlinc -script __FILENAME__ -no-reflect -nowarn