title: N Th Number Whose Sum Of Digits Is Ten 2
signature: def nThNumberWhoseSumOfDigitsIsTen2(n: Int) = {
test_code: import scala.collection.mutable.HashMap
  import scala.collection.immutable.HashSet
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  
  // TESTING CODE 
  // ============================================
  def validateSolution(actual: Int , expected: Int): Boolean = {
      actual.toString == expected.toString
  }
  
  def driver(n: Int, expected: Int): 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(
        68, 
        631    
      )}")   
  
  
      println(s"TEST-1...${driver(
        70, 
        649    
      )}")   
  
  
      println(s"TEST-2...${driver(
        69, 
        640    
      )}")   
  
  
      println(s"TEST-3...${driver(
        93, 
        856    
      )}")   
  
  
      println(s"TEST-4...${driver(
        99, 
        910    
      )}")   
  
  
      println(s"TEST-5...${driver(
        44, 
        415    
      )}")   
  
  
      println(s"TEST-6...${driver(
        91, 
        838    
      )}")   
  
  
      println(s"TEST-7...${driver(
        8, 
        82    
      )}")   
  
  
      println(s"TEST-8...${driver(
        83, 
        766    
      )}")   
  
  
      println(s"TEST-9...${driver(
        51, 
        478    
      )}")   
  
  }
  
source_py: def n_th_number_whose_sum_of_digits_is_ten_2(n):
      nthElement = (19 + ((n - 1) * 9))
      outliersCount = (int(math.log10(nthElement)) - 1)
      nthElement += (9 * outliersCount)
      return nthElement
source_cpp: int n_th_number_whose_sum_of_digits_is_ten_2(int n) {
    int nthElement = 19 + ( n - 1 ) * 9;
    int outliersCount = ( int ) log10 ( nthElement ) - 1;
    nthElement += 9 * outliersCount;
    return nthElement;
  }