title: Count Number Ways Tile Floor Size N X M Using 1 X M Size Tiles
signature: long long countNumberWaysTileFloorSizeNXMUsing1XMSizeTiles(int n, int m) {
test_code: #include <algorithm>
  #include <assert.h>
  #include <cstdlib>
  #include <iostream>
  #include <map>
  #include <set>
  #include <string>
  #include <tuple> 
  #include <unordered_map>
  #include <vector>
  #include <math.h>
  #include <cmath>
  #include <bits/stdc++.h>
  #include <numeric>
  #include <functional>
  
  using namespace std;
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(long long actual, long long expected){
      return actual == expected;
  }
  
  string driver(int n, int m, long long expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(n, m), expected)){
              return "PASSED";
          }
          return "FAILED";
      }
      catch (const std::overflow_error& exception_obj)
      {
          return typeid(exception_obj).name();
      }
      catch (const std::runtime_error& exception_obj)
      {
          return typeid(exception_obj).name();
      }
      catch (const std::exception& exception_obj)
      {
          return typeid(exception_obj).name();
      }
      catch (...)
      {
          return "UNK_ERROR";
      }
  }
  
  int main() {
      string result = "";
  
      result = driver(93, 54, 41); 
      cout << "TEST-" << 0 << "..."
           <<  result
           << "\n";
  
      result = driver(17, 4, 131); 
      cout << "TEST-" << 1 << "..."
           <<  result
           << "\n";
  
      result = driver(38, 39, 1); 
      cout << "TEST-" << 2 << "..."
           <<  result
           << "\n";
  
      result = driver(33, 64, 1); 
      cout << "TEST-" << 3 << "..."
           <<  result
           << "\n";
  
      result = driver(78, 35, 90); 
      cout << "TEST-" << 4 << "..."
           <<  result
           << "\n";
  
      result = driver(40, 61, 1); 
      cout << "TEST-" << 5 << "..."
           <<  result
           << "\n";
  
      result = driver(95, 6, 10665883415); 
      cout << "TEST-" << 6 << "..."
           <<  result
           << "\n";
  
      result = driver(12, 8, 6); 
      cout << "TEST-" << 7 << "..."
           <<  result
           << "\n";
  
      result = driver(69, 60, 11); 
      cout << "TEST-" << 8 << "..."
           <<  result
           << "\n";
  
      result = driver(78, 21, 1578); 
      cout << "TEST-" << 9 << "..."
           <<  result
           << "\n";
  
      return 0;
  }
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 ];
  }