title: N Th Number Whose Sum Of Digits Is Ten 1
signature: nThNumberWhoseSumOfDigitsIsTen1(n) {
test_code: import 'dart:convert';
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(int actual, int expected){
      return actual.toString() == expected.toString();
  }
  
  String driver(n, int expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(n), expected)){
              return "PASSED";
          }
          return "FAILED";
      }catch(exception_object){
          return exception_object.runtimeType.toString();
      }
  }
  
  int main() {
  
      print("TEST-0...${driver(
          93, 
          1324)
      }");
  
      print("TEST-1...${driver(
          10, 
          109)
      }");
  
      print("TEST-2...${driver(
          55, 
          703)
      }");
  
      print("TEST-3...${driver(
          94, 
          1333)
      }");
  
      print("TEST-4...${driver(
          2, 
          28)
      }");
  
      print("TEST-5...${driver(
          5, 
          55)
      }");
  
      print("TEST-6...${driver(
          37, 
          406)
      }");
  
      print("TEST-7...${driver(
          4, 
          46)
      }");
  
      print("TEST-8...${driver(
          11, 
          118)
      }");
  
      print("TEST-9...${driver(
          46, 
          523)
      }");
  
      return 0;
  }
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;
  }