title: N Th Number Whose Sum Of Digits Is Ten 1
signature: fun nThNumberWhoseSumOfDigitsIsTen1(n: Int): Int {
source_py: def n_th_number_whose_sum_of_digits_is_ten_1(n):
      count = 0
      curr = 19
      while True:
          sum = 0
          x = curr
          while (x > 0):
              sum = (sum + (x % 10))
              x = int((x / 10))
          if (sum == 10):
              count += 1
          if (count == n):
              return curr
          curr += 9
      return (- 1)
source_cpp: int n_th_number_whose_sum_of_digits_is_ten_1(int n) {
    int count = 0;
    for ( int curr = 19;
    ;
    curr += 9 ) {
      int sum = 0;
      for ( int x = curr;
      x > 0;
      x = x / 10 ) sum = sum + x % 10;
      if ( sum == 10 ) count ++;
      if ( count == n ) return curr;
    }
    return - 1;
  }
question_info.test_list: [{"idx": 0, "outputs": 1324, "inputs": {"n": 93}}, {"idx": 1, "outputs": 109, "inputs": {"n": 10}}, {"idx": 2, "outputs": 703, "inputs": {"n": 55}}, {"idx": 3, "outputs": 1333, "inputs": {"n": 94}}, {"idx": 4, "outputs": 28, "inputs": {"n": 2}}, {"idx": 5, "outputs": 55, "inputs": {"n": 5}}, {"idx": 6, "outputs": 406, "inputs": {"n": 37}}, {"idx": 7, "outputs": 46, "inputs": {"n": 4}}, {"idx": 8, "outputs": 118, "inputs": {"n": 11}}, {"idx": 9, "outputs": 523, "inputs": {"n": 46}}]
question_info.extension: kts
question_info.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(93, 1324)
      println("TEST-0...${result}")
      
      result = driver(10, 109)
      println("TEST-1...${result}")
      
      result = driver(55, 703)
      println("TEST-2...${result}")
      
      result = driver(94, 1333)
      println("TEST-3...${result}")
      
      result = driver(2, 28)
      println("TEST-4...${result}")
      
      result = driver(5, 55)
      println("TEST-5...${result}")
      
      result = driver(37, 406)
      println("TEST-6...${result}")
      
      result = driver(4, 46)
      println("TEST-7...${result}")
      
      result = driver(11, 118)
      println("TEST-8...${result}")
      
      result = driver(46, 523)
      println("TEST-9...${result}")
      
          
  }
  
  main()
question_info.entry_fn_name: nThNumberWhoseSumOfDigitsIsTen1
question_info.entry_cls_name: Solution
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: kotlinc -script __FILENAME__ -no-reflect -nowarn