title: Count Ofdifferent Ways Express N Sum 1 3 4
signature: def countOfdifferentWaysExpressNSum134(n: Int) = {
test_code: import scala.collection.mutable.HashMap
  import scala.collection.immutable.HashSet
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  
  // TESTING CODE 
  // ============================================
  def validateSolution(actual: Long , expected: Long): Boolean = {
      actual.toString == expected.toString
  }
  
  def driver(n: Int, expected: Long): String = {
      try {
          if (validateSolution(PLACEHOLDER_FN_NAME(n),expected)) {
              "PASSED"
          } else{
              "FAILED"
          }
      }catch{
          case e: Exception => {e.getClass.getName}
      }
  
  }
  object QuestionEvaluator extends App {
  
      println(s"TEST-0...${driver(
        44, 
        821223649L    
      )}")   
  
  
      println(s"TEST-1...${driver(
        9, 
        40L    
      )}")   
  
  
      println(s"TEST-2...${driver(
        19, 
        4895L    
      )}")   
  
  
      println(s"TEST-3...${driver(
        10, 
        64L    
      )}")   
  
  
      println(s"TEST-4...${driver(
        78, 
        10472279279564025L    
      )}")   
  
  
      println(s"TEST-5...${driver(
        70, 
        222915410843904L    
      )}")   
  
  
      println(s"TEST-6...${driver(
        81, 
        44361286907595736L    
      )}")   
  
  
      println(s"TEST-7...${driver(
        81, 
        44361286907595736L    
      )}")   
  
  
      println(s"TEST-8...${driver(
        49, 
        9107509825L    
      )}")   
  
  }
  
source_py: def count_ofdifferent_ways_express_n_sum_1_3_4(n):
      DP = [0 for i in range(0, (n + 1))]
      DP[0] = DP[1] = DP[2] = 1
      DP[3] = 2
      for i in range(4, (n + 1)):
          DP[i] = ((DP[(i - 1)] + DP[(i - 3)]) + DP[(i - 4)])
      return DP[n]
source_cpp: int count_ofdifferent_ways_express_n_sum_1_3_4(int n) {
    int DP [ n + 1 ];
    DP [ 0 ] = DP [ 1 ] = DP [ 2 ] = 1;
    DP [ 3 ] = 2;
    for ( int i = 4;
    i <= n;
    i ++ ) DP [ i ] = DP [ i - 1 ] + DP [ i - 3 ] + DP [ i - 4 ];
    return DP [ n ];
  }