title: Count Number Of Ways To Cover A Distance 1
signature: long long countNumberOfWaysToCoverADistance1(int dist) {
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 dist, long long expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(dist), 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(37, 3831006429); 
      cout << "TEST-" << 0 << "..."
           <<  result
           << "\n";
  
      result = driver(58, 1383410902447554); 
      cout << "TEST-" << 1 << "..."
           <<  result
           << "\n";
  
      result = driver(53, 65720971788709); 
      cout << "TEST-" << 2 << "..."
           <<  result
           << "\n";
  
      result = driver(11, 504); 
      cout << "TEST-" << 3 << "..."
           <<  result
           << "\n";
  
      result = driver(58, 1383410902447554); 
      cout << "TEST-" << 4 << "..."
           <<  result
           << "\n";
  
      return 0;
  }
source_py: def count_number_of_ways_to_cover_a_distance_1(dist):
      count = ([0] * (dist + 1))
      count[0] = 1
      count[1] = 1
      count[2] = 2
      for i in range(3, (dist + 1)):
          count[i] = ((count[(i - 1)] + count[(i - 2)]) + count[(i - 3)])
      return count[dist]
source_cpp: int count_number_of_ways_to_cover_a_distance_1(int dist) {
    int count [ dist + 1 ];
    count [ 0 ] = 1, count [ 1 ] = 1, count [ 2 ] = 2;
    for ( int i = 3;
    i <= dist;
    i ++ ) count [ i ] = count [ i - 1 ] + count [ i - 2 ] + count [ i - 3 ];
    return count [ dist ];
  }