title: N Th Number Whose Sum Of Digits Is Ten
signature: def nThNumberWhoseSumOfDigitsIsTen(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(
        37, 
        406    
      )}")   
  
  
      println(s"TEST-1...${driver(
        13, 
        136    
      )}")   
  
  
      println(s"TEST-2...${driver(
        51, 
        613    
      )}")   
  
  
      println(s"TEST-3...${driver(
        69, 
        1054    
      )}")   
  
  
      println(s"TEST-4...${driver(
        76, 
        1126    
      )}")   
  
  
      println(s"TEST-5...${driver(
        10, 
        109    
      )}")   
  
  
      println(s"TEST-6...${driver(
        97, 
        1360    
      )}")   
  
  
      println(s"TEST-7...${driver(
        40, 
        433    
      )}")   
  
  
      println(s"TEST-8...${driver(
        69, 
        1054    
      )}")   
  
  
      println(s"TEST-9...${driver(
        4, 
        46    
      )}")   
  
  }
  
source_py: def n_th_number_whose_sum_of_digits_is_ten(n):
      count = 0
      for curr in itertools.count():
          sum = 0
          x = curr
          while x:
              sum = (sum + (x % 10))
              x = (x // 10)
          if (sum == 10):
              count = (count + 1)
          if (count == n):
              return curr
      return (- 1)
source_cpp: int n_th_number_whose_sum_of_digits_is_ten(int n) {
    int count = 0;
    for ( int curr = 1;
    ;
    curr ++ ) {
      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;
  }