title: N Th Number Whose Sum Of Digits Is Ten 2
signature: fun nThNumberWhoseSumOfDigitsIsTen2(n: Int): Int {
test_code: package main
  
  import kotlin.text.*
  import kotlin.math.*
  
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  fun validateSolution(actual:Int, expected:Int):Boolean{
    return actual.equals(expected)
  }
  fun driver(n: Int, expected:Int):String {
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME(n), expected)) {
                return "PASSED"
        }
        return "FAILED"
      } catch (e: Exception){
        return e::class.simpleName as String
      }
  
  }
  
  fun main() {
      var result: String = ""
      result = driver(68, 631)
      println("TEST-0...${result}")
      
      result = driver(70, 649)
      println("TEST-1...${result}")
      
      result = driver(69, 640)
      println("TEST-2...${result}")
      
      result = driver(93, 856)
      println("TEST-3...${result}")
      
      result = driver(99, 910)
      println("TEST-4...${result}")
      
      result = driver(44, 415)
      println("TEST-5...${result}")
      
      result = driver(91, 838)
      println("TEST-6...${result}")
      
      result = driver(8, 82)
      println("TEST-7...${result}")
      
      result = driver(83, 766)
      println("TEST-8...${result}")
      
      result = driver(51, 478)
      println("TEST-9...${result}")
      
          
  }
  
  main()
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;
  }