title: Count Number Ways Tile Floor Size N X M Using 1 X M Size Tiles
signature: class Solution {
  
      public Long countNumberWaysTileFloorSizeNXMUsing1XMSizeTiles(Integer n, Integer m) {
test_code: import static java.util.Map.entry;  
  import java.util.*;
  import java.lang.*;
  // TESTING CODE 
  // ============================================
  class QuestionEvaluator {
      public static String validateSolution(Integer n, Integer m, Long expected){
          try{
              Driver driver = new Driver();
              if (driver.run(n, m,expected)){
                  return "PASSED";
              }
              return "FAILED";
              
          } catch (Exception exception_obj){
              return exception_obj.getClass().getSimpleName();
          }
  
      }
      public static void main(String[] args) {
          String result;
          result = validateSolution(93, 54, 41L);
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution(17, 4, 131L);
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution(38, 39, 1L);
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution(33, 64, 1L);
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
          result = validateSolution(78, 35, 90L);
          System.out.println(String.format("%s%s","TEST-4...",result));    
      
          result = validateSolution(40, 61, 1L);
          System.out.println(String.format("%s%s","TEST-5...",result));    
      
          result = validateSolution(95, 6, 10665883415L);
          System.out.println(String.format("%s%s","TEST-6...",result));    
      
          result = validateSolution(12, 8, 6L);
          System.out.println(String.format("%s%s","TEST-7...",result));    
      
          result = validateSolution(69, 60, 11L);
          System.out.println(String.format("%s%s","TEST-8...",result));    
      
          result = validateSolution(78, 21, 1578L);
          System.out.println(String.format("%s%s","TEST-9...",result));    
      
      }
  }
  
  class Driver{
      public boolean run(Integer n, Integer m, Long expected){
  
          PLACEHOLDER_CLS_NAME sol = new PLACEHOLDER_CLS_NAME();
          return validateSolution(sol.PLACEHOLDER_FN_NAME(n, m),expected);
      }
      
      public boolean validateSolution(Long actual, Long expected){
          return actual.equals(expected);
      }
  }
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
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 ];
  }