title: Count Number Of Ways To Cover A Distance 1
signature: class Solution {
  
      public Long countNumberOfWaysToCoverADistance1(Integer dist) {
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 ];
  }
question_info.extension: java
question_info.entry_fn_name: countNumberOfWaysToCoverADistance1
question_info.entry_cls_name: Solution
question_info.test_list: [{"idx": 0, "outputs": 3831006429, "inputs": {"dist": 37}}, {"idx": 1, "outputs": 1383410902447554, "inputs": {"dist": 58}}, {"idx": 2, "outputs": 65720971788709, "inputs": {"dist": 53}}, {"idx": 3, "outputs": 504, "inputs": {"dist": 11}}, {"idx": 4, "outputs": 1383410902447554, "inputs": {"dist": 58}}]
question_info.test_code: import static java.util.Map.entry;  
  import java.util.*;
  import java.lang.*;
  // TESTING CODE 
  // ============================================
  class QuestionEvaluator {
      public static String validateSolution(Integer dist, Long expected){
          try{
              Driver driver = new Driver();
              if (driver.run(dist,expected)){
                  return "PASSED";
              }
              return "FAILED";
              
          } catch (Exception exception_obj){
              return exception_obj.getClass().getSimpleName();
          }
  
      }
      public static void main(String[] args) {
          String result;
          result = validateSolution(37, 3831006429L);
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution(58, 1383410902447554L);
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution(53, 65720971788709L);
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution(11, 504L);
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
          result = validateSolution(58, 1383410902447554L);
          System.out.println(String.format("%s%s","TEST-4...",result));    
      
      }
  }
  
  class Driver{
      public boolean run(Integer dist, Long expected){
  
          PLACEHOLDER_CLS_NAME sol = new PLACEHOLDER_CLS_NAME();
          return validateSolution(sol.PLACEHOLDER_FN_NAME(dist),expected);
      }
      
      public boolean validateSolution(Long actual, Long expected){
          return actual.equals(expected);
      }
  }
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
question_info.test_case_ids: 0 1 2 3 4
question_info.commands: java __FILENAME__