title: Count Number Of Ways To Cover A Distance 1
signature: function count_number_of_ways_to_cover_a_distance_1(dist)
test_code: 
  
  -- SOLUTION CODE
  -- ============================================
  PLACEHOLDER_CODE_BODY
  
  -- TESTING CODE 
  -- ============================================
  function isCorrect(actual, expected)
      if type(expected) ~= type(actual) then
          return false
      end
      
      if type(expected) == 'table' then
          for k,v_expected in pairs(expected) do
              
              if actual[k] == nil then
                  return false
              end
              local v_actual = actual[k]
              if not isCorrect(v_actual, v_expected) then
                  return false
              end
              actual[k]=nil
          end
      
          if next(actual) then 
              return false
          end
          return true
      else
          return actual == expected
      end
  end
  
  function validateSolution(actual, expected)
      return isCorrect(actual,expected)
  end
  
  function driver(dist, expected)
      local exec_result;
      local status, error_msg = pcall(function () 
          exec_result=PLACEHOLDER_FN_NAME(dist) 
      end)
      if status then
          if validateSolution(exec_result,expected) then
              return "PASSED"
          end
          return "FAILED"
      else
          return string.format("ERROR=%s",string.gsub(error_msg,".*:[%d]+: ",""))
      end
  end
      
  function main()
      result = driver(37, 3831006429)
      print(string.format("TEST-0...%s",result))
  
      result = driver(58, 1383410902447554)
      print(string.format("TEST-1...%s",result))
  
      result = driver(53, 65720971788709)
      print(string.format("TEST-2...%s",result))
  
      result = driver(11, 504)
      print(string.format("TEST-3...%s",result))
  
      result = driver(58, 1383410902447554)
      print(string.format("TEST-4...%s",result))
  
  end
  
  main()
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 ];
  }