title: Count Number Ways Tile Floor Size N X M Using 1 X M Size Tiles
signature: function count_number_ways_tile_floor_size_n_x_m_using_1_x_m_size_tiles(n, m)
source_py: def count_number_ways_tile_floor_size_n_x_m_using_1_x_m_size_tiles(n, m):
      count = []
      for i in range((n + 2)):
          count.append(0)
      count[0] = 0
      for i in range(1, (n + 1)):
          if (i > m):
              count[i] = (count[(i - 1)] + count[(i - m)])
          elif (i < m):
              count[i] = 1
          else:
              count[i] = 2
      return count[n]
source_cpp: int count_number_ways_tile_floor_size_n_x_m_using_1_x_m_size_tiles(int n, int m) {
    int count [ n + 1 ];
    count [ 0 ] = 0;
    for ( int i = 1;
    i <= n;
    i ++ ) {
      if ( i > m ) count [ i ] = count [ i - 1 ] + count [ i - m ];
      else if ( i < m ) count [ i ] = 1;
      else count [ i ] = 2;
    }
    return count [ n ];
  }
question_info.entry_fn_name: count_number_ways_tile_floor_size_n_x_m_using_1_x_m_size_tiles
question_info.entry_cls_name: Solution
question_info.test_case_ids: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
question_info.test_code: 
  
  -- SOLUTION CODE
  -- ============================================
  PLACEHOLDER_CODE_BODY
  
  -- TESTING CODE 
  -- ============================================
  function isCorrect(actual, expected)
      if type(expected) ~= type(actual) then
          return false
      end
      
      if type(expected) == 'table' then
          for k,v_expected in pairs(expected) do
              
              if actual[k] == nil then
                  return false
              end
              local v_actual = actual[k]
              if not isCorrect(v_actual, v_expected) then
                  return false
              end
              actual[k]=nil
          end
      
          if next(actual) then 
              return false
          end
          return true
      else
          return actual == expected
      end
  end
  
  function validateSolution(actual, expected)
      return isCorrect(actual,expected)
  end
  
  function driver(n, m, expected)
      local exec_result;
      local status, error_msg = pcall(function () 
          exec_result=PLACEHOLDER_FN_NAME(n, m) 
      end)
      if status then
          if validateSolution(exec_result,expected) then
              return "PASSED"
          end
          return "FAILED"
      else
          return string.format("ERROR=%s",string.gsub(error_msg,".*:[%d]+: ",""))
      end
  end
      
  function main()
      result = driver(93, 54, 41)
      print(string.format("TEST-0...%s",result))
  
      result = driver(17, 4, 131)
      print(string.format("TEST-1...%s",result))
  
      result = driver(38, 39, 1)
      print(string.format("TEST-2...%s",result))
  
      result = driver(33, 64, 1)
      print(string.format("TEST-3...%s",result))
  
      result = driver(78, 35, 90)
      print(string.format("TEST-4...%s",result))
  
      result = driver(40, 61, 1)
      print(string.format("TEST-5...%s",result))
  
      result = driver(95, 6, 10665883415)
      print(string.format("TEST-6...%s",result))
  
      result = driver(12, 8, 6)
      print(string.format("TEST-7...%s",result))
  
      result = driver(69, 60, 11)
      print(string.format("TEST-8...%s",result))
  
      result = driver(78, 21, 1578)
      print(string.format("TEST-9...%s",result))
  
  end
  
  main()
question_info.test_list: [{"idx": 0, "outputs": 41, "inputs": {"n": 93, "m": 54}}, {"idx": 1, "outputs": 131, "inputs": {"n": 17, "m": 4}}, {"idx": 2, "outputs": 1, "inputs": {"n": 38, "m": 39}}, {"idx": 3, "outputs": 1, "inputs": {"n": 33, "m": 64}}, {"idx": 4, "outputs": 90, "inputs": {"n": 78, "m": 35}}, {"idx": 5, "outputs": 1, "inputs": {"n": 40, "m": 61}}, {"idx": 6, "outputs": 10665883415, "inputs": {"n": 95, "m": 6}}, {"idx": 7, "outputs": 6, "inputs": {"n": 12, "m": 8}}, {"idx": 8, "outputs": 11, "inputs": {"n": 69, "m": 60}}, {"idx": 9, "outputs": 1578, "inputs": {"n": 78, "m": 21}}]