title: N Th Number Whose Sum Of Digits Is Ten
signature: nThNumberWhoseSumOfDigitsIsTen(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(
          37, 
          406)
      }");
  
      print("TEST-1...${driver(
          13, 
          136)
      }");
  
      print("TEST-2...${driver(
          51, 
          613)
      }");
  
      print("TEST-3...${driver(
          69, 
          1054)
      }");
  
      print("TEST-4...${driver(
          76, 
          1126)
      }");
  
      print("TEST-5...${driver(
          10, 
          109)
      }");
  
      print("TEST-6...${driver(
          97, 
          1360)
      }");
  
      print("TEST-7...${driver(
          40, 
          433)
      }");
  
      print("TEST-8...${driver(
          69, 
          1054)
      }");
  
      print("TEST-9...${driver(
          4, 
          46)
      }");
  
      return 0;
  }
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;
  }