title: Total Number Of Non Decreasing Numbers With N Digits 1
signature: def totalNumberOfNonDecreasingNumbersWithNDigits1(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(
        40, 
        2054455634L    
      )}")   
  
  
      println(s"TEST-1...${driver(
        11, 
        167960L    
      )}")   
  
  
      println(s"TEST-2...${driver(
        94, 
        2509710226100L    
      )}")   
  
  
      println(s"TEST-3...${driver(
        73, 
        293052087900L    
      )}")   
  
  
      println(s"TEST-4...${driver(
        6, 
        5005L    
      )}")   
  
  
      println(s"TEST-5...${driver(
        73, 
        293052087900L    
      )}")   
  
  
      println(s"TEST-6...${driver(
        58, 
        42757703560L    
      )}")   
  
  
      println(s"TEST-7...${driver(
        40, 
        2054455634L    
      )}")   
  
  
      println(s"TEST-8...${driver(
        64, 
        97082021465L    
      )}")   
  
  
      println(s"TEST-9...${driver(
        66, 
        125595622175L    
      )}")   
  
  }
  
source_py: def total_number_of_non_decreasing_numbers_with_n_digits_1(n):
      N = 10
      count = 1
      for i in range(1, (n + 1)):
          count = int((count * ((N + i) - 1)))
          count = int((count / i))
      return count
source_cpp: long long int total_number_of_non_decreasing_numbers_with_n_digits_1(int n) {
    int N = 10;
    long long count = 1;
    for ( int i = 1;
    i <= n;
    i ++ ) {
      count *= ( N + i - 1 );
      count /= i;
    }
    return count;
  }