title: Tiling With Dominoes
signature: function tiling_with_dominoes(n)
test_code: using Printf
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  function validate_solution(actual, expected)
      return actual == expected
  end
  
  function driver(n, expected)
      try
  
          if validate_solution(PLACEHOLDER_FN_NAME(n), expected)
              return "PASSED";
          end
          return "FAILED";
      catch exception_obj
          return string(Base.typename(typeof(exception_obj)).wrapper);
      end
  end
  
  function main()
      
      result = driver(29, 0);
      @printf("TEST-0...%s\n",result);
      
      result = driver(13, 0);
      @printf("TEST-1...%s\n",result);
      
      result = driver(25, 0);
      @printf("TEST-2...%s\n",result);
      
      result = driver(65, 0);
      @printf("TEST-3...%s\n",result);
      
      result = driver(27, 0);
      @printf("TEST-4...%s\n",result);
      
      result = driver(42, 808717138331);
      @printf("TEST-5...%s\n",result);
      
      result = driver(19, 0);
      @printf("TEST-6...%s\n",result);
      
      result = driver(50, 156886956080403);
      @printf("TEST-7...%s\n",result);
      
      result = driver(59, 0);
      @printf("TEST-8...%s\n",result);
      
      result = driver(13, 0);
      @printf("TEST-9...%s\n",result);
      
  end
  
  main()
source_py: def tiling_with_dominoes(n):
      A = ([0] * (n + 1))
      B = ([0] * (n + 1))
      A[0] = 1
      A[1] = 0
      B[0] = 0
      B[1] = 1
      for i in range(2, (n + 1)):
          A[i] = (A[(i - 2)] + (2 * B[(i - 1)]))
          B[i] = (A[(i - 1)] + B[(i - 2)])
      return A[n]
source_cpp: int tiling_with_dominoes(int n) {
    int A [ n + 1 ], B [ n + 1 ];
    A [ 0 ] = 1, A [ 1 ] = 0, B [ 0 ] = 0, B [ 1 ] = 1;
    for ( int i = 2;
    i <= n;
    i ++ ) {
      A [ i ] = A [ i - 2 ] + 2 * B [ i - 1 ];
      B [ i ] = A [ i - 1 ] + B [ i - 2 ];
    }
    return A [ n ];
  }