title: Total Number Of Non Decreasing Numbers With N Digits 1
signature: func totalNumberOfNonDecreasingNumbersWithNDigits1(n int) int64 {
test_code: package main
  
  import (
      "fmt"
      "reflect"
      "math"
      "sort"
  )
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  func validateSolution(actual int64, expected int64) bool {
      return reflect.DeepEqual(actual,expected)
  }
  
  func driver(n int, expected int64) string {
      if validateSolution(PLACEHOLDER_FN_NAME(n),expected) {
              return "PASSED"
      }
      return "FAILED"
  
  }
  
  func main() {
  
      // Use imports to avoid undefined errors
      var _ = reflect.DeepEqual
      _ = math.Abs
      _ = sort.Sort
      result := ""
      result = driver(40, 2054455634)
      fmt.Printf("TEST-0...%s\n", result)
      
      result = driver(11, 167960)
      fmt.Printf("TEST-1...%s\n", result)
      
      result = driver(94, 2509710226100)
      fmt.Printf("TEST-2...%s\n", result)
      
      result = driver(73, 293052087900)
      fmt.Printf("TEST-3...%s\n", result)
      
      result = driver(6, 5005)
      fmt.Printf("TEST-4...%s\n", result)
      
      result = driver(73, 293052087900)
      fmt.Printf("TEST-5...%s\n", result)
      
      result = driver(58, 42757703560)
      fmt.Printf("TEST-6...%s\n", result)
      
      result = driver(40, 2054455634)
      fmt.Printf("TEST-7...%s\n", result)
      
      result = driver(64, 97082021465)
      fmt.Printf("TEST-8...%s\n", result)
      
      result = driver(66, 125595622175)
      fmt.Printf("TEST-9...%s\n", result)
      
          
  }
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;
  }