title: Count Number Of Ways To Cover A Distance 1
signature: class Solution {
  
      public long CountNumberOfWaysToCoverADistance1(int dist) {
test_code: using System;
  using System.Numerics;
  using System.Diagnostics;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Security.Cryptography;
  using System.Web.UI;
  using System.Web.Script.Serialization;
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  namespace EvaluatePrediction {
      class TestRunner {
          public bool ValidateSolution(long actual, long expected){
              return new JavaScriptSerializer().Serialize(actual) == new JavaScriptSerializer().Serialize(expected);
          }
  
          public string driver(int dist, long expected){
              try{
                PLACEHOLDER_CLS_NAME solution_cls = new PLACEHOLDER_CLS_NAME();
                long pred_result = solution_cls.PLACEHOLDER_FN_NAME(dist); 
                if (ValidateSolution(
                      pred_result,
                      expected)){
                  return "PASSED";
                }
                return "FAILED";
              } 
              catch (Exception exception_obj)
              {
                return exception_obj.GetType().FullName;
              }
          }
          static void Main(string[] args) {
              TestRunner runner = new TestRunner();
              String result;
              result = runner.driver(
                  37, 
                  3831006429
              );
              Console.WriteLine(string.Format(
                  "TEST-0...{0}",
                  result)
              );result = runner.driver(
                  58, 
                  1383410902447554
              );
              Console.WriteLine(string.Format(
                  "TEST-1...{0}",
                  result)
              );result = runner.driver(
                  53, 
                  65720971788709
              );
              Console.WriteLine(string.Format(
                  "TEST-2...{0}",
                  result)
              );result = runner.driver(
                  11, 
                  504
              );
              Console.WriteLine(string.Format(
                  "TEST-3...{0}",
                  result)
              );result = runner.driver(
                  58, 
                  1383410902447554
              );
              Console.WriteLine(string.Format(
                  "TEST-4...{0}",
                  result)
              );
          }
      }
  }
  
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 ];
  }