title: Count Number Ways Tile Floor Size N X M Using 1 X M Size Tiles
signature: count_number_ways_tile_floor_size_n_x_m_using_1_x_m_size_tiles <- function(n, m) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      toString(actual)==toString(expected)
  }
  
  driver <- function(n, m, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(n, m), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          93L, 54L, 
          41L
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          17L, 4L, 
          131L
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          38L, 39L, 
          1L
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          33L, 64L, 
          1L
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          78L, 35L, 
          90L
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          40L, 61L, 
          1L
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          95L, 6L, 
          10665883415L
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          12L, 8L, 
          6L
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          69L, 60L, 
          11L
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          78L, 21L, 
          1578L
      )))
  
  }
  
  main()
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 ];
  }